QmlDesigner: Apply style to states view

Change-Id: I78d1d2fc6f2be2813b0e1f25b73a9ee1e80f5c16
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Brook Cronin
2023-02-02 14:12:29 +01:00
parent 9677d39c7b
commit e0eb8d4fa9
3 changed files with 32 additions and 32 deletions

View File

@@ -40,7 +40,7 @@ Rectangle {
property bool isLandscape: true property bool isLandscape: true
color: StudioTheme.Values.themeStatePanelBackground color: StudioTheme.Values.themePanelBackground
onWidthChanged: root.responsiveResize(root.width, root.height) onWidthChanged: root.responsiveResize(root.width, root.height)
onHeightChanged: root.responsiveResize(root.width, root.height) onHeightChanged: root.responsiveResize(root.width, root.height)
@@ -374,7 +374,7 @@ Rectangle {
} }
} }
color: StudioTheme.Values.themeSectionHeadBackground color: StudioTheme.Values.themeToolbarBackground
width: root.width width: root.width
height: (toolBar.doubleRow ? 2 : 1) * StudioTheme.Values.toolbarHeight height: (toolBar.doubleRow ? 2 : 1) * StudioTheme.Values.toolbarHeight
@@ -403,6 +403,7 @@ Rectangle {
} }
StudioControls.ComboBox { StudioControls.ComboBox {
style: StudioTheme.Values.viewBarControlStyle
id: stateGroupComboBox id: stateGroupComboBox
actionIndicatorVisible: false actionIndicatorVisible: false
model: statesEditorModel.stateGroups model: statesEditorModel.stateGroups
@@ -458,14 +459,16 @@ Rectangle {
leftPadding: toolBar.doubleRow ? root.padding : 0 leftPadding: toolBar.doubleRow ? root.padding : 0
HelperWidgets.AbstractButton { HelperWidgets.AbstractButton {
buttonIcon: StudioTheme.Constants.plus style: StudioTheme.Values.viewBarButtonStyle
buttonIcon: StudioTheme.Constants.add_medium
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
tooltip: qsTr("Create State Group") tooltip: qsTr("Create State Group")
onClicked: statesEditorModel.addStateGroup("stateGroup") onClicked: statesEditorModel.addStateGroup("stateGroup")
} }
HelperWidgets.AbstractButton { HelperWidgets.AbstractButton {
buttonIcon: StudioTheme.Constants.minus style: StudioTheme.Values.viewBarButtonStyle
buttonIcon: StudioTheme.Constants.remove_medium
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
enabled: statesEditorModel.activeStateGroupIndex !== 0 enabled: statesEditorModel.activeStateGroupIndex !== 0
tooltip: qsTr("Remove State Group") tooltip: qsTr("Remove State Group")
@@ -474,7 +477,8 @@ Rectangle {
HelperWidgets.AbstractButton { HelperWidgets.AbstractButton {
id: editButton id: editButton
buttonIcon: StudioTheme.Constants.edit style: StudioTheme.Values.viewBarButtonStyle
buttonIcon: StudioTheme.Constants.edit_medium
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
enabled: statesEditorModel.activeStateGroupIndex !== 0 enabled: statesEditorModel.activeStateGroupIndex !== 0
checked: editDialog.visible checked: editDialog.visible
@@ -502,7 +506,8 @@ Rectangle {
rightPadding: root.padding rightPadding: root.padding
HelperWidgets.AbstractButton { HelperWidgets.AbstractButton {
buttonIcon: StudioTheme.Constants.gridView style: StudioTheme.Values.viewBarButtonStyle
buttonIcon: StudioTheme.Constants.grid_medium
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
enabled: !root.tinyMode enabled: !root.tinyMode
tooltip: qsTr("Show thumbnails") tooltip: qsTr("Show thumbnails")
@@ -513,7 +518,8 @@ Rectangle {
} }
HelperWidgets.AbstractButton { HelperWidgets.AbstractButton {
buttonIcon: StudioTheme.Constants.textFullJustification style: StudioTheme.Values.viewBarButtonStyle
buttonIcon: StudioTheme.Constants.list_medium
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
enabled: !root.tinyMode enabled: !root.tinyMode
tooltip: qsTr("Show property changes") tooltip: qsTr("Show property changes")

View File

@@ -52,25 +52,15 @@ Item {
property color iconColor: StudioTheme.Values.themeTextColor property color iconColor: StudioTheme.Values.themeTextColor
Rectangle { Label {
id: rectangle id: moreMenu
width: 19 anchors.fill: parent
height: 3 text: StudioTheme.Constants.more_medium
color: menuIcon.iconColor color: StudioTheme.Values.themeTextColor
} font.family: StudioTheme.Constants.iconFont.family
font.pixelSize: 16 //StudioTheme.Values.myIconFontSize
Rectangle { verticalAlignment: Text.AlignVCenter
id: rectangle1 horizontalAlignment: Text.AlignHCenter
width: 19
height: 3
color: menuIcon.iconColor
}
Rectangle {
id: rectangle2
width: 19
height: 3
color: menuIcon.iconColor
} }
} }
@@ -123,7 +113,7 @@ Item {
PropertyChanges { PropertyChanges {
target: background target: background
color: StudioTheme.Values.themeControlBackgroundHover color: StudioTheme.Values.themeControlBackground_topToolbarHover
} }
PropertyChanges { PropertyChanges {
target: menuIcon target: menuIcon

View File

@@ -127,7 +127,8 @@ Item {
id: stateBackground id: stateBackground
color: StudioTheme.Values.themeControlBackground color: StudioTheme.Values.themeControlBackground
border.color: StudioTheme.Values.themeInteraction border.color: StudioTheme.Values.themeInteraction
border.width: root.isChecked ? 4 : 0 border.width: root.isChecked ? 3 : 0
radius: 10
anchors.fill: parent anchors.fill: parent
readonly property int controlHeight: 25 readonly property int controlHeight: 25
@@ -159,6 +160,7 @@ Item {
HelperWidgets.AbstractButton { HelperWidgets.AbstractButton {
id: defaultButton id: defaultButton
style: StudioTheme.Values.statesControlStyle
width: 50 width: 50
height: stateBackground.controlHeight height: stateBackground.controlHeight
checkedInverted: true checkedInverted: true
@@ -173,6 +175,7 @@ Item {
StudioControls.TextField { StudioControls.TextField {
id: stateNameField id: stateNameField
style: StudioTheme.Values.statesControlStyle
property string previousText property string previousText
@@ -648,6 +651,7 @@ Item {
StudioControls.TextField { StudioControls.TextField {
id: whenCondition id: whenCondition
style: StudioTheme.Values.statesControlStyle
property string previousCondition property string previousCondition
@@ -656,7 +660,7 @@ Item {
visible: !root.baseState visible: !root.baseState
indicatorVisible: true indicatorVisible: true
indicator.icon.text: StudioTheme.Constants.edit indicator.icon.text: StudioTheme.Constants.edit_medium
indicator.onClicked: { indicator.onClicked: {
whenCondition.previousCondition = whenCondition.text whenCondition.previousCondition = whenCondition.text
@@ -755,7 +759,7 @@ Item {
PropertyChanges { PropertyChanges {
target: stateBackground target: stateBackground
color: StudioTheme.Values.themeControlBackground color: StudioTheme.Values.themeToolbarBackground
} }
}, },
State { State {
@@ -764,7 +768,7 @@ Item {
PropertyChanges { PropertyChanges {
target: stateBackground target: stateBackground
color: StudioTheme.Values.themeControlBackgroundHover color: StudioTheme.Values.themeStateBackgroundColor_hover
} }
}, },
State { State {
@@ -774,7 +778,7 @@ Item {
PropertyChanges { PropertyChanges {
target: stateBackground target: stateBackground
color: StudioTheme.Values.themeStateHighlight color: StudioTheme.Values.themeThumbnailBackground_baseState
} }
}, },
State { State {