Commit 63eae6bd authored by Alessandro Portale's avatar Alessandro Portale Committed by Thomas Hartmann
Browse files

QmlDesigner: Theming of property editor checkbox and "tr" button



Change-Id: I599cd52c1b2b2e24952a9738f07eed0826802d4c
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 676b317d
......@@ -30,11 +30,24 @@ import QtQuick.Controls.Styles 1.1
CheckBoxStyle {
spacing: 24
label: Controls.Label { text: control.text ; color: checkBox.textColor }
indicator: Item {
indicator: Item {
implicitWidth: 16
implicitHeight: 16
Image { source: "qrc:qmldesigner/images/checkbox_" +
(control.checked ? "checked": "unchecked") +
(control.pressed ? "_pressed": "") + ".png" }
Rectangle {
anchors.fill: parent
color: control.pressed
? creatorTheme.FancyToolButtonHoverColor
: creatorTheme.FancyToolButtonSelectedColor
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
anchors.margins: 1
}
Image {
x: 2
y: 2
width: 14
height: 13
source: "image://icons/checkbox-indicator"
visible: control.checked
}
}
}
......@@ -165,16 +165,28 @@ Controls.TextField {
style: CheckBoxStyle {
spacing: 8
indicator: Item {
implicitWidth: 16
implicitHeight: 16
indicator: Item {
implicitWidth: 15
implicitHeight: 15
x: 7
y: 1
Image { source: "qrc:qmldesigner/images/checkbox_tr_" +
(control.checked ? "checked": "unchecked") +
(control.pressed ? "_pressed": "") + ".png" }
Rectangle {
anchors.fill: parent
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
color: control.pressed
? creatorTheme.QmlDesignerBackgroundColorLighter
: creatorTheme.FancyToolButtonHoverColor
opacity: control.hovered || control.pressed ? 1 : 0.75
}
Image {
x: 1
y: 1
width: 13
height: 13
source: "image://icons/tr"
opacity: control.checked ? 1 : 0.3;
}
}
} //control.pressed ? "qrc:qmldesigner/images/checkbox_unchecked_pressed.png" :
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment