Merge pull request #2375

6df9e58 fontawesome: fix regular/solid font style (selsta)
This commit is contained in:
luigi1111 2019-09-14 12:41:52 -05:00
commit a1e416ee83
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
5 changed files with 15 additions and 6 deletions

View file

@ -45,6 +45,7 @@ Item {
property alias horizontalAlignment: label.horizontalAlignment
property alias elide: label.elide
property alias textWidth: label.width
property alias styleName: label.font.styleName
property alias themeTransition: label.themeTransition
signal linkActivated()
height: label.height

View file

@ -107,7 +107,7 @@ Rectangle {
image: MoneroComponents.Style.titleBarExpandSource
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.cube
fontAwesomeFallbackSize: 14
fontAwesomeFallbackSize: 16
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.9
opacity: 0.75
}
@ -131,9 +131,10 @@ Rectangle {
Text {
text: FontAwesome.globe
font.family: FontAwesome.fontFamily
font.family: FontAwesome.fontFamilySolid
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
font.styleName: "Solid"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
opacity: 0.75
@ -158,6 +159,7 @@ Rectangle {
Text {
text: FontAwesome.moonO
font.family: MoneroComponents.Style.blackTheme ? FontAwesome.fontFamilySolid : FontAwesome.fontFamily
font.styleName: MoneroComponents.Style.blackTheme ? "Solid" : "Regular"
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
anchors.verticalCenter: parent.verticalCenter

View file

@ -41,6 +41,8 @@ Item {
property string color: ""
property bool fontAwesomeFallbackEnabled: true
property var fontAwesomeFallbackIcon: ""
property string fontAwesomeFallbackFont: FontAwesome.fontFamilySolid
property string fontAwesomeFallbackStyle: "Solid"
property int fontAwesomeFallbackSize: 16
property double fontAwesomeFallbackOpacity: 0.8
property string fontAwesomeFallbackColor: MoneroComponents.Style.defaultFontColor
@ -74,8 +76,9 @@ Item {
id: fontAwesomeFallback
visible: !isOpenGL && root.fontAwesomeFallback
text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
font.family: FontAwesome.fontFamily
font.family: root.fontAwesomeFallbackFont
font.pixelSize: root.fontAwesomeFallbackSize
font.styleName: root.fontAwesomeFallbackStyle
color: root.fontAwesomeFallbackColor
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter

View file

@ -4,6 +4,7 @@ import QtQuick 2.9
Object {
FontLoader {
id: regular
source: "./fa-regular-400.ttf"
}
@ -17,7 +18,7 @@ Object {
source: "./fa-solid-900.ttf"
}
property string fontFamily: "FontAwesome"
property string fontFamily: regular.name
property string fontFamilyBrands: brands.name
property string fontFamilySolid: solid.name

View file

@ -99,9 +99,10 @@ Rectangle{
MoneroComponents.Label {
fontSize: 32
text: FontAwesome.home
fontFamily: FontAwesome.fontFamily
fontFamily: FontAwesome.fontFamilySolid
anchors.centerIn: parent
fontColor: MoneroComponents.Style.defaultFontColor
styleName: "Solid"
}
}
@ -200,7 +201,8 @@ Rectangle{
MoneroComponents.Label {
fontSize: 28
text: FontAwesome.cloud
fontFamily: FontAwesome.fontFamily
fontFamily: FontAwesome.fontFamilySolid
styleName: "Solid"
anchors.centerIn: parent
fontColor: MoneroComponents.Style.defaultFontColor
}