mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 21:22:46 +02:00
Port web glyph button to QQC2
This commit is contained in:
parent
2aae8edde0
commit
cfacf3b47d
1 changed files with 11 additions and 19 deletions
|
@ -9,8 +9,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4 as Original
|
import QtQuick.Controls 2.2 as Original
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
|
@ -26,23 +25,16 @@ Original.Button {
|
||||||
readonly property color clickedColor: "#FFFFFF"
|
readonly property color clickedColor: "#FFFFFF"
|
||||||
readonly property color disabledColor: "#575757"
|
readonly property color disabledColor: "#575757"
|
||||||
|
|
||||||
style: ButtonStyle {
|
|
||||||
background: Item {}
|
background: Item {}
|
||||||
|
|
||||||
|
contentItem: HiFiGlyphs {
|
||||||
label: HiFiGlyphs {
|
|
||||||
color: control.enabled ? (control.pressed ? control.clickedColor :
|
color: control.enabled ? (control.pressed ? control.clickedColor :
|
||||||
(control.hovered ? control.hoverColor : control.normalColor)) :
|
(control.hovered ? control.hoverColor : control.normalColor)) :
|
||||||
control.disabledColor
|
control.disabledColor
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
anchors {
|
|
||||||
// Tweak horizontal alignment so that it looks right.
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: -0.5
|
|
||||||
}
|
|
||||||
text: control.glyph
|
text: control.glyph
|
||||||
size: control.size
|
size: control.size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue