Skip to content

Commit

Permalink
Expose colors to FlatButtonStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Iktwo committed Sep 11, 2014
1 parent af579fe commit 610a55e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions qml/FlatButtonStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ import com.iktwo.components 1.0
ButtonStyle {
id: buttonStyle

property color backgroundColor: Theme.titleBarColor
property color fontColor: Theme.titleBarTextColor

background: Rectangle {
height: buttonStyle.control.height
width: buttonStyle.control.width
color: control.pressed ? Qt.darker(Theme.titleBarColor) : Theme.titleBarColor
color: control.pressed ? Qt.darker(backgroundColor) : backgroundColor
}

label: Label {
color: control.pressed ? Qt.darker(Theme.titleBarTextColor) : Theme.titleBarTextColor
elide: "ElideRight"
color: control.pressed ? Qt.darker(fontColor) : fontColor
text: buttonStyle.control.text
font.pixelSize: buttonStyle.control.height * 0.5
font.pixelSize: 14 * ScreenValues.dpMultiplier
renderType: "NativeRendering"
verticalAlignment: "AlignVCenter"
horizontalAlignment: "AlignHCenter"
Expand Down

0 comments on commit 610a55e

Please sign in to comment.