1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-28 00:23:44 +01:00

fontawesome: fix regular/solid font style

This commit is contained in:
selsta 2019-09-05 00:22:17 +02:00
parent a5b2d5e727
commit 6df9e584b3
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
}