From 610a55efd694a6e63638bfdd34a7f8c0e7ce444a Mon Sep 17 00:00:00 2001 From: Iktwo Sh Date: Thu, 11 Sep 2014 00:07:04 -0700 Subject: [PATCH] Expose colors to FlatButtonStyle --- qml/FlatButtonStyle.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qml/FlatButtonStyle.qml b/qml/FlatButtonStyle.qml index 9ad4120..e0d6656 100644 --- a/qml/FlatButtonStyle.qml +++ b/qml/FlatButtonStyle.qml @@ -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"