mirror of
https://github.com/monero-project/monero-gui
synced 2025-01-04 20:26:23 +01:00
Merge pull request #1952
fd842bb
StandardButton: fix button appearance on Qt 5.7 (xiphon)
This commit is contained in:
commit
944ab59642
@ -36,7 +36,6 @@ Item {
|
|||||||
property string rightIcon: ""
|
property string rightIcon: ""
|
||||||
property string rightIconInactive: ""
|
property string rightIconInactive: ""
|
||||||
property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled
|
property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled
|
||||||
property string textAlign: rightIcon !== "" ? "left" : "center"
|
|
||||||
property bool small: false
|
property bool small: false
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
property int fontSize: {
|
property int fontSize: {
|
||||||
@ -103,8 +102,6 @@ Item {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: label
|
id: label
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
||||||
horizontalAlignment: textAlign === "center" ? Text.AlignHCenter : Text.AlignLeft
|
|
||||||
font.family: MoneroComponents.Style.fontBold.name
|
font.family: MoneroComponents.Style.fontBold.name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: button.fontSize
|
font.pixelSize: button.fontSize
|
||||||
@ -112,15 +109,13 @@ Item {
|
|||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.fill: parent
|
anchors.centerIn: parent
|
||||||
color: button.textColor
|
color: button.textColor
|
||||||
font.bold: label.font.bold
|
font.bold: label.font.bold
|
||||||
font.family: label.font.family
|
font.family: label.font.family
|
||||||
font.pixelSize: label.font.pixelSize - 1
|
font.pixelSize: label.font.pixelSize - 1
|
||||||
horizontalAlignment: label.horizontalAlignment
|
|
||||||
Layout.alignment: label.Layout.alignment
|
|
||||||
text: label.text
|
text: label.text
|
||||||
visible: buttonArea.pressed
|
opacity: buttonArea.pressed ? 1 : 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user