mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Refactor icons font wip
This commit is contained in:
+7
-7
@@ -4,22 +4,22 @@ import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
Text {
|
||||
readonly property string defaultIcon: "balloon"
|
||||
property string icon: defaultIcon
|
||||
property string icon: Icons.defaultIcon
|
||||
property string family: Icons.fontFamily
|
||||
|
||||
visible: (icon !== undefined) && (icon !== "")
|
||||
text: {
|
||||
if ((icon === undefined) || (icon === "")) {
|
||||
return ""
|
||||
}
|
||||
if (Bootstrap.icons[icon] === undefined) {
|
||||
Logger.warn("Icon", `"${icon}"`, "doesn't exist in the bootstrap font")
|
||||
if (Icons.get(icon) === undefined) {
|
||||
Logger.warn("Icon", `"${icon}"`, "doesn't exist in the icons font")
|
||||
Logger.callStack()
|
||||
return Bootstrap.icons[defaultIcon]
|
||||
return Icons.get(defaultIcon)
|
||||
}
|
||||
return Bootstrap.icons[icon]
|
||||
return Icons.get(icon)
|
||||
}
|
||||
font.family: Bootstrap.fontFamily
|
||||
font.family: family
|
||||
font.pointSize: Style.fontSizeL * scaling
|
||||
color: Color.mOnSurface
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
Reference in New Issue
Block a user