QmlDesigner: Some styling adjustments

Change-Id: I24884a8d4d45c4fac83e7a1892b172bf41f6ba88
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2015-02-20 18:06:13 +01:00
committed by Thomas Hartmann
parent 9d1b6e6e61
commit d092b0e389
9 changed files with 19 additions and 21 deletions

View File

@@ -68,7 +68,6 @@ ComboBoxStyle {
anchors.fill: parent anchors.fill: parent
anchors.margins: -1 anchors.margins: -1
color: "transparent" color: "transparent"
radius: 4
opacity: 0.3 opacity: 0.3
visible: control.activeFocus visible: control.activeFocus
} }

View File

@@ -70,7 +70,6 @@ SpinBoxStyle {
implicitWidth: Math.max(64, styleData.contentWidth) implicitWidth: Math.max(64, styleData.contentWidth)
implicitHeight: 23 implicitHeight: 23
border.color: borderColor border.color: borderColor
radius: 3
gradient: Gradient { gradient: Gradient {
GradientStop {color: "#2c2c2c" ; position: 0} GradientStop {color: "#2c2c2c" ; position: 0}
GradientStop {color: "#343434" ; position: 0.15} GradientStop {color: "#343434" ; position: 0.15}
@@ -81,7 +80,6 @@ SpinBoxStyle {
anchors.fill: parent anchors.fill: parent
anchors.margins: -1 anchors.margins: -1
color: "transparent" color: "transparent"
radius: 4
opacity: 0.3 opacity: 0.3
visible: control.activeFocus visible: control.activeFocus
} }

View File

@@ -123,7 +123,6 @@ Controls.TextField {
implicitWidth: 100 implicitWidth: 100
implicitHeight: 23 implicitHeight: 23
border.color: borderColor border.color: borderColor
radius: 3
gradient: Gradient { gradient: Gradient {
GradientStop {color: "#2c2c2c" ; position: 0} GradientStop {color: "#2c2c2c" ; position: 0}
GradientStop {color: "#343434" ; position: 0.15} GradientStop {color: "#343434" ; position: 0.15}

View File

@@ -48,7 +48,7 @@ Rectangle {
property bool roundRight: false property bool roundRight: false
radius: roundLeft || roundRight ? 4 : 0 radius: roundLeft || roundRight ? 1 : 0
gradient: Gradient { gradient: Gradient {
GradientStop {color: '#555' ; position: 0} GradientStop {color: '#555' ; position: 0}
GradientStop {color: '#444' ; position: 1} GradientStop {color: '#444' ; position: 1}

View File

@@ -68,12 +68,10 @@ Item {
Behavior on rotation {NumberAnimation{duration: 80}} Behavior on rotation {NumberAnimation{duration: 80}}
} }
gradient: Gradient { color: "#444"
GradientStop {color: '#555' ; position: 0}
GradientStop {color: '#444' ; position: 1}
}
Rectangle { Rectangle {
visible: false
color:"#333" color:"#333"
width: parent.width width: parent.width
height: 1 height: 1

View File

@@ -45,7 +45,6 @@ TextFieldStyle {
implicitWidth: 100 implicitWidth: 100
implicitHeight: font.pixelSize + padding.top + padding.bottom implicitHeight: font.pixelSize + padding.top + padding.bottom
border.color: "#222222" border.color: "#222222"
radius: 3
gradient: Gradient { gradient: Gradient {
GradientStop {color: "#2c2c2c" ; position: 0} GradientStop {color: "#2c2c2c" ; position: 0}
GradientStop {color: "#343434" ; position: 0.15} GradientStop {color: "#343434" ; position: 0.15}

View File

@@ -36,17 +36,12 @@ Rectangle {
border.width: 1 border.width: 1
property bool isBaseState property bool isBaseState
property bool isCurrentState property bool isCurrentState
property color gradiantBaseColor property color baseColor
property string delegateStateName property string delegateStateName
property string delegateStateImageSource property string delegateStateImageSource
property int delegateStateImageSize property int delegateStateImageSize
gradient: Gradient { color: baseColor
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) }
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@@ -63,7 +58,7 @@ Rectangle {
style: ButtonStyle { style: ButtonStyle {
background: Rectangle { background: Rectangle {
color: control.hovered ? Qt.lighter(gradiantBaseColor, 1.4) : "transparent" color: control.hovered ? Qt.lighter(baseColor, 1.2) : "transparent"
radius: 2 radius: 2
} }
} }

View File

@@ -102,14 +102,24 @@ FocusScope {
id: addStateButton id: addStateButton
visible: canAddNewStates visible: canAddNewStates
tooltip: qsTr("Add a new state.")
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: padding anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: Math.max(parent.height / 2, 24) width: Math.max(parent.height / 2 - 8, 18)
height: width height: width
iconSource: "images/plus.png" iconSource: "images/plus.png"
onClicked: root.createNewState() 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 height: delegateHeight
isBaseState: 0 == internalNodeId isBaseState: 0 == internalNodeId
isCurrentState: root.currentStateInternalId == 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 delegateStateName: stateName
delegateStateImageSource: stateImageSource delegateStateImageSource: stateImageSource
delegateStateImageSize: stateImageSize delegateStateImageSize: stateImageSize

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 197 B