From d092b0e389d33a796dfc3be5a2547a4eb99f2a4c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 20 Feb 2015 18:06:13 +0100 Subject: [PATCH] QmlDesigner: Some styling adjustments Change-Id: I24884a8d4d45c4fac83e7a1892b172bf41f6ba88 Reviewed-by: Tim Jenssen --- .../HelperWidgets/CustomComboBoxStyle.qml | 1 - .../HelperWidgets/CustomSpinBoxStyle.qml | 2 -- .../HelperWidgets/LineEdit.qml | 1 - .../HelperWidgets/RoundedPanel.qml | 2 +- .../HelperWidgets/Section.qml | 6 ++---- .../DesignerTextFieldStyle.qml | 1 - .../statesEditorQmlSources/StatesDelegate.qml | 11 +++-------- .../statesEditorQmlSources/StatesList.qml | 16 +++++++++++++--- .../statesEditorQmlSources/images/plus.png | Bin 469 -> 197 bytes 9 files changed, 19 insertions(+), 21 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml index 5eb59eb163b..a662773a080 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml @@ -68,7 +68,6 @@ ComboBoxStyle { anchors.fill: parent anchors.margins: -1 color: "transparent" - radius: 4 opacity: 0.3 visible: control.activeFocus } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml index 02503f3fe46..4fa9ff3d401 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml @@ -70,7 +70,6 @@ SpinBoxStyle { implicitWidth: Math.max(64, styleData.contentWidth) implicitHeight: 23 border.color: borderColor - radius: 3 gradient: Gradient { GradientStop {color: "#2c2c2c" ; position: 0} GradientStop {color: "#343434" ; position: 0.15} @@ -81,7 +80,6 @@ SpinBoxStyle { anchors.fill: parent anchors.margins: -1 color: "transparent" - radius: 4 opacity: 0.3 visible: control.activeFocus } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml index 43a9b5619bd..5e6827b4a04 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml @@ -123,7 +123,6 @@ Controls.TextField { implicitWidth: 100 implicitHeight: 23 border.color: borderColor - radius: 3 gradient: Gradient { GradientStop {color: "#2c2c2c" ; position: 0} GradientStop {color: "#343434" ; position: 0.15} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml index 8a4aecbd12c..512fb8edc68 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml @@ -48,7 +48,7 @@ Rectangle { property bool roundRight: false - radius: roundLeft || roundRight ? 4 : 0 + radius: roundLeft || roundRight ? 1 : 0 gradient: Gradient { GradientStop {color: '#555' ; position: 0} GradientStop {color: '#444' ; position: 1} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml index fde373a423d..0b5d444d5bc 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Section.qml @@ -68,12 +68,10 @@ Item { Behavior on rotation {NumberAnimation{duration: 80}} } - gradient: Gradient { - GradientStop {color: '#555' ; position: 0} - GradientStop {color: '#444' ; position: 1} - } + color: "#444" Rectangle { + visible: false color:"#333" width: parent.width height: 1 diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/DesignerTextFieldStyle.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/DesignerTextFieldStyle.qml index 4f1f5a91fba..285fa08b06c 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/DesignerTextFieldStyle.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/DesignerTextFieldStyle.qml @@ -45,7 +45,6 @@ TextFieldStyle { implicitWidth: 100 implicitHeight: font.pixelSize + padding.top + padding.bottom border.color: "#222222" - radius: 3 gradient: Gradient { GradientStop {color: "#2c2c2c" ; position: 0} GradientStop {color: "#343434" ; position: 0.15} diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index 076960a0e48..e649a8944bb 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -36,17 +36,12 @@ Rectangle { border.width: 1 property bool isBaseState property bool isCurrentState - property color gradiantBaseColor + property color baseColor property string delegateStateName property string delegateStateImageSource property int delegateStateImageSize - gradient: Gradient { - GradientStop { position: 0.0; color: Qt.lighter(gradiantBaseColor, 1.5) } - GradientStop { position: 0.1; color: Qt.lighter(gradiantBaseColor, 1) } - GradientStop { position: 0.8; color: gradiantBaseColor } - GradientStop { position: 1.0; color: Qt.darker(gradiantBaseColor) } - } + color: baseColor MouseArea { anchors.fill: parent @@ -63,7 +58,7 @@ Rectangle { style: ButtonStyle { background: Rectangle { - color: control.hovered ? Qt.lighter(gradiantBaseColor, 1.4) : "transparent" + color: control.hovered ? Qt.lighter(baseColor, 1.2) : "transparent" radius: 2 } } diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml index ba4570563e4..38d141e667d 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml @@ -102,14 +102,24 @@ FocusScope { id: addStateButton visible: canAddNewStates + tooltip: qsTr("Add a new state.") + anchors.right: parent.right - anchors.rightMargin: padding + anchors.rightMargin: 8 anchors.verticalCenter: parent.verticalCenter - width: Math.max(parent.height / 2, 24) + width: Math.max(parent.height / 2 - 8, 18) height: width iconSource: "images/plus.png" onClicked: root.createNewState() + + style: ButtonStyle { + background: Rectangle { + property color buttonBaseColor: "#6f6f6f" + color: control.hovered ? Qt.lighter(buttonBaseColor, 1.2) : buttonBaseColor + border.width: 1 + } + } } } @@ -136,7 +146,7 @@ FocusScope { height: delegateHeight isBaseState: 0 == internalNodeId isCurrentState: root.currentStateInternalId == internalNodeId - gradiantBaseColor: isCurrentState ? Qt.darker(highlightColor, 1.2) : background.color + baseColor: isCurrentState ? Qt.darker(highlightColor, 1.2) : background.color delegateStateName: stateName delegateStateImageSource: stateImageSource delegateStateImageSize: stateImageSize diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/images/plus.png b/share/qtcreator/qmldesigner/statesEditorQmlSources/images/plus.png index 20928fb402aab20c838fca4dae2e9c1db2c54373..d16329ca450e216810f5ec913054acbd22f88e2a 100644 GIT binary patch delta 181 zcmcc0e3Ws5L_HHT0|P_ST=7o~3=GW0PM#qg92~bF`afV`VBjq9h%9Dc;JpsQj7}P} zD;O9UBuiW)N`mv#O3D+9QW?t2%k?tzvWt@w3sUv+i_&MmvylSn4DbnY{r~?z0|UeD z+qZihQdk%m7??_e{DK*bPdcyBV_;xV@N{tu;kd4soZ!H)jO`7}^;MzV3M|<-t}wiL dB_XSj#=y{E%O${ca1lr`gQu&X%Q~loCID3NHuI%;cc8yg$j+1a_cxVpN!>gwuRSy?$cI(m3`7#SIvo1444yL)g(&<+uJ)i zIeB<^dU$%8nVETcc?ARnL`Fvb|Nr05&(G7-Gbkv?$EV)M*Vk8DTRSi?P)$wE%gf8( z-{0Ka+`_`b#>U3Z4rD#VViy;ekdTn@uy9vb*XZczn3$N9l$6xe)U2#5Lqo&x@Nk~q zJF*N6400twe!&bTAdsG(p56cg2M!!KaP{idt8YQz(dyT!YjIYb3d{k9ihebv93`M(L<(^8 zHZNAAuT?)Xt;`)Qi~SxwGhw_D{;}rynV-Kk*O@iEoEXPy82oY3W03<^O6vl*ux$uz z%67_SIO9@qPksjf?_z~ChBh}>t3