summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2011-07-21 13:27:41 +0200
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2011-07-21 13:28:43 +0200
commitcb39679758791858932c0d59f1ac9abc7e07c8c7 (patch)
treef6129f359a2c342cbaad6b8375151fac08c30483 /share
parentef2023c5ff5607129bc8435ded9598119874ec5d (diff)
downloadqt-creator-cb39679758791858932c0d59f1ac9abc7e07c8c7.tar.gz
QmlDesigner.propertyEditor: fix ui for borders and colors
Hiding controls was a bad idea. It is better to disable them and give them sensible tooltips. Task-number: QTCREATORBUG-4667 Task-number: QTCREATORBUG-5433 Change-Id: I2361fbbd3c28a5b9c07787abedf0439d6a7d1ad1 Reviewed-on: http://codereview.qt.nokia.com/1946 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyeditor/Qt/ColorGroupBox.qml6
-rw-r--r--share/qtcreator/qmldesigner/propertyeditor/Qt/ColorTypeButtons.qml6
-rw-r--r--share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml4
3 files changed, 10 insertions, 6 deletions
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorGroupBox.qml
index 27b73c821c..bf07ef2cd4 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorGroupBox.qml
@@ -238,12 +238,14 @@ QExtGroupBox {
ColorTypeButtons {
id: buttons;
- visible: showButtons && baseStateFlag
+ visible: showButtons
+ enabled: baseStateFlag
+ opacity: enabled ? 1 : 0.6
showGradientButton: colorGroupBox.showGradientButton
}
QWidget {
- visible: !(showButtons && baseStateFlag)
+ visible: !(showButtons)
fixedHeight: 28
fixedWidth: 93
width: fixedWidth
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorTypeButtons.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorTypeButtons.qml
index 2e02ac9f86..b66d2f45bc 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorTypeButtons.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorTypeButtons.qml
@@ -82,7 +82,7 @@ QWidget {
styleSheetFile: "styledbuttonleft.css"
iconFromFile: "images/icon_color_solid.png"
- toolTip: qsTr("Solid color")
+ toolTip: baseStateFlag ? qsTr("Solid color") : qsTr("Solid color (only editable in base state)")
onToggled: {
if (checked) {
@@ -107,7 +107,7 @@ QWidget {
styleSheetFile: "styledbuttonmiddle.css"
iconFromFile: "images/icon_color_gradient.png"
- toolTip: qsTr("Gradient")
+ toolTip: baseStateFlag ? qsTr("Gradient") : qsTr("Gradient (only editable in base state)")
onToggled: {
if (checked) {
@@ -131,7 +131,7 @@ QWidget {
fixedHeight: 28
styleSheetFile: "styledbuttonright.css"
iconFromFile: "images/icon_color_none.png"
- toolTip: qsTr("Transparent")
+ toolTip: baseStateFlag ? qsTr("Transparent") : qsTr("Transparent (only editable in base state)")
onToggled: {
if (checked) {
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml
index ebeb4afc0e..081404b91f 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml
@@ -56,7 +56,9 @@ QWidget {
rightMargin: 24
IntEditor {
- visible: colorsBox.hasBorder
+ enabled: colorsBox.hasBorder
+ opacity: enabled ? 1 : 0.6
+ toolTip: enabled ? qsTr("Border width") : qsTr("Border has to be solid to change width")
id: borderWidth;
backendValue: backendValues.border_width === undefined ? 0 : backendValues.border_width