Refactor icons font wip
This commit is contained in:
parent
b1f9609cd3
commit
43eec0e387
6 changed files with 4954 additions and 39 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue