forked from qt-creator/qt-creator
QmlDesigner: Adding theming support for Qt Quick Designer
With this patch the Qt Quick Designer supports: *Flat *Flat Dark *Flat Light *Classic I did not test the dark style. I added a template engine for the .css files. The syntax for the .css files is identical to the QML syntax. Known issues: * The icons in the property editor do not play well with the Flat Light style. We have to get proper Core:Icon support for the icons and most icons have to be simplified/flattened to fit the new style/ theme. * Some colors in the connection editor are still dark and hardcoded. But this looks ok together with all themes. * The highlight colors are not taken from the theme, yet. Change-Id: I94f2b75f92db8e131c2b15867dbabe9ae4b2f25a Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -28,9 +28,9 @@ import QtQuick.Controls 1.1
|
|||||||
import QtQuick.Controls.Styles 1.1
|
import QtQuick.Controls.Styles 1.1
|
||||||
|
|
||||||
ScrollViewStyle {
|
ScrollViewStyle {
|
||||||
property color scrollbarColor: "#444444"
|
readonly property color scrollbarColor: creatorTheme.BackgroundColorDark
|
||||||
property color scrollbarBorderColor: "#333333"
|
readonly property color scrollbarBorderColor: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
property color scrollBarHandleColor: "#656565"
|
readonly property color scrollBarHandleColor: creatorTheme.QmlDesignerBackgroundColorLighter
|
||||||
|
|
||||||
padding {left: 0; top: 0; right: 0; bottom: 0}
|
padding {left: 0; top: 0; right: 0; bottom: 0}
|
||||||
|
|
||||||
|
@@ -28,9 +28,9 @@ import QtQuick.Controls 1.1
|
|||||||
import QtQuick.Controls.Styles 1.0
|
import QtQuick.Controls.Styles 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: styleConstants.lighterBackgroundColor
|
color: creatorTheme.QmlDesignerBackgroundColorLighter
|
||||||
|
|
||||||
border.color: styleConstants.backgroundColor
|
border.color: creatorTheme.BackgroundColorDark
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ Rectangle {
|
|||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
text: itemName // to be set by model
|
text: itemName // to be set by model
|
||||||
color: "#FFFFFF"
|
color: creatorTheme.PanelTextColorLight
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -64,8 +64,8 @@ ScrollView {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: styleConstants
|
id: styleConstants
|
||||||
property color backgroundColor: "#4f4f4f"
|
readonly property color backgroundColor: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
|
||||||
property color lighterBackgroundColor: "#5f5f5f"
|
readonly property color lighterBackgroundColor: creatorTheme.FancyToolBarSeparatorColor
|
||||||
|
|
||||||
property int textWidth: 58
|
property int textWidth: 58
|
||||||
property int textHeight: 22
|
property int textHeight: 22
|
||||||
|
@@ -68,12 +68,8 @@ Item {
|
|||||||
roundRight: isLast()
|
roundRight: isLast()
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
z: checked ? 1 : 0
|
visible: checked
|
||||||
|
color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop {color: '#444' ; position: 0}
|
|
||||||
GradientStop {color: '#333' ; position: 1}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RoundedPanel {
|
RoundedPanel {
|
||||||
@@ -81,7 +77,8 @@ Item {
|
|||||||
roundRight: isLast()
|
roundRight: isLast()
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
z: !checked ? 1 : 0
|
visible: !checked
|
||||||
|
color: creatorTheme.BackgroundColorDark
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,8 +31,6 @@ Controls.CheckBox {
|
|||||||
|
|
||||||
id: checkBox
|
id: checkBox
|
||||||
|
|
||||||
property color borderColor: "#222"
|
|
||||||
property color highlightColor: "orange"
|
|
||||||
property color textColor: colorLogic.textColor
|
property color textColor: colorLogic.textColor
|
||||||
|
|
||||||
opacity: enabled ? 1 : 0.5
|
opacity: enabled ? 1 : 0.5
|
||||||
|
@@ -32,14 +32,14 @@ QtObject {
|
|||||||
id: innerObject
|
id: innerObject
|
||||||
|
|
||||||
property variant backendValue
|
property variant backendValue
|
||||||
property color textColor: Constants.colorsDefaultText
|
property color textColor: creatorTheme.PanelTextColorLight
|
||||||
property variant valueFromBackend: backendValue.value;
|
property variant valueFromBackend: backendValue.value;
|
||||||
property bool baseStateFlag: isBaseState;
|
property bool baseStateFlag: isBaseState;
|
||||||
property bool isInModel: backendValue.isInModel;
|
property bool isInModel: backendValue.isInModel;
|
||||||
property bool isInSubState: backendValue.isInSubState;
|
property bool isInSubState: backendValue.isInSubState;
|
||||||
property bool highlight: textColor == Constants.colorsChangedBaseText
|
property bool highlight: textColor === __changedTextColor
|
||||||
|
|
||||||
property color __defaultTextColor: Constants.colorsDefaultText
|
property color __defaultTextColor: creatorTheme.PanelTextColorLight
|
||||||
property color __changedTextColor: Constants.colorsChangedBaseText
|
property color __changedTextColor: Constants.colorsChangedBaseText
|
||||||
|
|
||||||
onBackendValueChanged: {
|
onBackendValueChanged: {
|
||||||
@@ -70,12 +70,12 @@ QtObject {
|
|||||||
if (innerObject.backendValue.isInModel)
|
if (innerObject.backendValue.isInModel)
|
||||||
innerObject.textColor = Constants.colorsChangedBaseText
|
innerObject.textColor = Constants.colorsChangedBaseText
|
||||||
else
|
else
|
||||||
innerObject.textColor = Constants.colorsDefaultText
|
innerObject.textColor = creatorTheme.PanelTextColorLight
|
||||||
} else {
|
} else {
|
||||||
if (innerObject.backendValue.isInSubState)
|
if (innerObject.backendValue.isInSubState)
|
||||||
innerObject.textColor = Constants.colorsChangedStateText
|
innerObject.textColor = Constants.colorsChangedStateText
|
||||||
else
|
else
|
||||||
innerObject.textColor = Constants.colorsDefaultText
|
innerObject.textColor = creatorTheme.PanelTextColorLight
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -112,7 +112,7 @@ Controls.ComboBox {
|
|||||||
|
|
||||||
ExtendedFunctionButton {
|
ExtendedFunctionButton {
|
||||||
x: 2
|
x: 2
|
||||||
y: 4
|
y: 6
|
||||||
backendValue: comboBox.backendValue
|
backendValue: comboBox.backendValue
|
||||||
visible: comboBox.enabled
|
visible: comboBox.enabled
|
||||||
}
|
}
|
||||||
|
@@ -28,10 +28,7 @@ import QtQuick.Controls 1.1 as Controls
|
|||||||
import QtQuick.Controls.Styles 1.2
|
import QtQuick.Controls.Styles 1.2
|
||||||
|
|
||||||
ComboBoxStyle {
|
ComboBoxStyle {
|
||||||
property color borderColor: "#222"
|
property color textColor: creatorTheme.PanelTextColorLight
|
||||||
property color highlightColor: "orange"
|
|
||||||
property color textColor: "#eee"
|
|
||||||
|
|
||||||
__editor: Item {
|
__editor: Item {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -40,31 +37,20 @@ ComboBoxStyle {
|
|||||||
implicitWidth: 120
|
implicitWidth: 120
|
||||||
implicitHeight: 25
|
implicitHeight: 25
|
||||||
|
|
||||||
RoundedPanel {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
roundLeft: true
|
|
||||||
roundRight: true
|
|
||||||
visible: !control.pressed
|
visible: !control.pressed
|
||||||
}
|
color: creatorTheme.FancyToolButtonSelectedColor
|
||||||
|
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
RoundedPanel {
|
border.width: 1
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop {color: '#444' ; position: 0}
|
|
||||||
GradientStop {color: '#333' ; position: 1}
|
|
||||||
}
|
|
||||||
anchors.fill: parent
|
|
||||||
roundLeft: true
|
|
||||||
roundRight: true
|
|
||||||
visible: control.pressed
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
border.color: highlightColor
|
color: creatorTheme.FancyToolButtonHoverColor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: -1
|
visible: control.pressed
|
||||||
color: "transparent"
|
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
opacity: 0.3
|
border.width: 1
|
||||||
visible: control.activeFocus
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -97,7 +83,7 @@ ComboBoxStyle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: control.currentText
|
text: control.currentText
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
color: textColor
|
color: creatorTheme.PanelTextColorLight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,10 +28,11 @@ import QtQuick.Controls 1.1 as Controls
|
|||||||
import QtQuick.Controls.Styles 1.1
|
import QtQuick.Controls.Styles 1.1
|
||||||
|
|
||||||
SpinBoxStyle {
|
SpinBoxStyle {
|
||||||
|
selectionColor: creatorTheme.PanelTextColorLight
|
||||||
selectionColor: spinBox.textColor
|
selectedTextColor: creatorTheme.PanelTextColorMid
|
||||||
selectedTextColor: "black"
|
|
||||||
textColor: spinBox.textColor
|
textColor: spinBox.textColor
|
||||||
|
|
||||||
|
|
||||||
padding.top: 3
|
padding.top: 3
|
||||||
padding.bottom: 1
|
padding.bottom: 1
|
||||||
padding.right: 18
|
padding.right: 18
|
||||||
@@ -62,19 +63,7 @@ SpinBoxStyle {
|
|||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: Math.max(64, styleData.contentWidth)
|
implicitWidth: Math.max(64, styleData.contentWidth)
|
||||||
implicitHeight: 23
|
implicitHeight: 23
|
||||||
border.color: borderColor
|
color: creatorTheme.FancyToolButtonSelectedColor
|
||||||
gradient: Gradient {
|
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
GradientStop {color: "#2c2c2c" ; position: 0}
|
|
||||||
GradientStop {color: "#343434" ; position: 0.15}
|
|
||||||
GradientStop {color: "#373737" ; position: 1}
|
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
border.color: highlightColor
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: -1
|
|
||||||
color: "transparent"
|
|
||||||
opacity: 0.3
|
|
||||||
visible: control.activeFocus
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,7 @@ Controls.Label {
|
|||||||
property alias toolTip: toolTipArea.tooltip
|
property alias toolTip: toolTipArea.tooltip
|
||||||
|
|
||||||
width: Math.max(Math.min(240, parent.width - 220), 80)
|
width: Math.max(Math.min(240, parent.width - 220), 80)
|
||||||
color: "#eee"
|
color: creatorTheme.PanelTextColorLight
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: width
|
||||||
|
@@ -52,7 +52,7 @@ Controls.TextField {
|
|||||||
|
|
||||||
ExtendedFunctionButton {
|
ExtendedFunctionButton {
|
||||||
x: 2
|
x: 2
|
||||||
y: 4
|
y: 6
|
||||||
backendValue: lineEdit.backendValue
|
backendValue: lineEdit.backendValue
|
||||||
visible: lineEdit.enabled && showExtendedFunctionButton
|
visible: lineEdit.enabled && showExtendedFunctionButton
|
||||||
}
|
}
|
||||||
@@ -105,31 +105,21 @@ Controls.TextField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
style: TextFieldStyle {
|
style: TextFieldStyle {
|
||||||
selectionColor: lineEdit.textColor
|
|
||||||
selectedTextColor: "black"
|
selectionColor: creatorTheme.PanelTextColorLight
|
||||||
textColor: lineEdit.textColor
|
selectedTextColor: creatorTheme.PanelTextColorMid
|
||||||
|
textColor: creatorTheme.PanelTextColorLight
|
||||||
|
placeholderTextColor: creatorTheme.PanelTextColorMid
|
||||||
|
|
||||||
padding.top: 3
|
padding.top: 3
|
||||||
padding.bottom: 1
|
padding.bottom: 3
|
||||||
padding.left: 16
|
padding.left: 16
|
||||||
padding.right: lineEdit.showTranslateCheckBox ? 16 : 1
|
padding.right: lineEdit.showTranslateCheckBox ? 16 : 1
|
||||||
placeholderTextColor: "gray"
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: 23
|
implicitHeight: 24
|
||||||
border.color: borderColor
|
color: creatorTheme.FancyToolButtonSelectedColor
|
||||||
gradient: Gradient {
|
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
GradientStop {color: "#2c2c2c" ; position: 0}
|
|
||||||
GradientStop {color: "#343434" ; position: 0.15}
|
|
||||||
GradientStop {color: "#373737" ; position: 1.0}
|
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
border.color: highlightColor
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: -1
|
|
||||||
color: "transparent"
|
|
||||||
opacity: 0.3
|
|
||||||
visible: control.activeFocus
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,11 +32,13 @@ Item {
|
|||||||
|
|
||||||
|
|
||||||
property variant backendValue
|
property variant backendValue
|
||||||
property color highlightColor: "orange"
|
|
||||||
property color borderColor: colorLogic.textColor
|
property color borderColor: colorLogic.textColor
|
||||||
|
|
||||||
property bool showTranslateCheckBox: true
|
property bool showTranslateCheckBox: true
|
||||||
|
|
||||||
|
readonly property color selectedColor: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
|
||||||
|
readonly property color unselectedColor: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
|
|
||||||
ExtendedFunctionButton {
|
ExtendedFunctionButton {
|
||||||
backendValue: originControl.backendValue
|
backendValue: originControl.backendValue
|
||||||
visible: originControl.enabled
|
visible: originControl.enabled
|
||||||
@@ -98,7 +100,7 @@ Item {
|
|||||||
id: topLeft
|
id: topLeft
|
||||||
width: 15
|
width: 15
|
||||||
height: 15
|
height: 15
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -113,7 +115,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -128,7 +130,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -143,7 +145,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -158,7 +160,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -173,7 +175,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -188,7 +190,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -203,7 +205,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -218,7 +220,7 @@ Item {
|
|||||||
property bool selected: false
|
property bool selected: false
|
||||||
width: topLeft.width
|
width: topLeft.width
|
||||||
height: topLeft.height
|
height: topLeft.height
|
||||||
color: selected ? "#4f4f4f" : "black"
|
color: selected ? selectedColor : unselectedColor
|
||||||
border.width: selected ? 2 : 0
|
border.width: selected ? 2 : 0
|
||||||
border.color: originControl.borderColor
|
border.color: originControl.borderColor
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@@ -28,19 +28,23 @@ import QtQuick.Controls 1.0 as Controls
|
|||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
id: panel
|
||||||
|
|
||||||
property bool roundLeft: false
|
property bool roundLeft: false
|
||||||
property bool roundRight: false
|
property bool roundRight: false
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
radius: roundLeft || roundRight ? 1 : 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}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
border.width: roundLeft || roundRight ? 1 : 0
|
border.width: roundLeft || roundRight ? 1 : 0
|
||||||
border.color: "#2e2e2e"
|
color: creatorTheme.BackgroundColorDark
|
||||||
|
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -48,8 +52,9 @@ Rectangle {
|
|||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
anchors.topMargin: 1
|
anchors.topMargin: 1
|
||||||
anchors.bottomMargin: 1
|
anchors.bottomMargin: 1
|
||||||
|
color: panel.color
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
gradient = parent.gradient
|
//gradient = parent.gradient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,13 +64,14 @@ Rectangle {
|
|||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
anchors.topMargin: 1
|
anchors.topMargin: 1
|
||||||
anchors.bottomMargin: 1
|
anchors.bottomMargin: 1
|
||||||
|
color: panel.color
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
gradient = parent.gradient
|
//gradient = parent.gradient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#2e2e2e"
|
color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@@ -75,7 +81,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#2e2e2e"
|
color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@@ -48,10 +48,8 @@ Item {
|
|||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: label
|
id: label
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: "white"
|
color: creatorTheme.PanelTextColorLight
|
||||||
x: 22
|
x: 22
|
||||||
style: Text.Sunken
|
|
||||||
styleColor: "#292929"
|
|
||||||
font.bold: true
|
font.bold: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +66,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
color: "#444"
|
color: creatorTheme.BackgroundColorDark
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: false
|
visible: false
|
||||||
@@ -78,6 +76,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
visible: false
|
||||||
color: "#333"
|
color: "#333"
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@@ -30,9 +30,7 @@ SpinBox {
|
|||||||
id: spinBox
|
id: spinBox
|
||||||
width: 76
|
width: 76
|
||||||
|
|
||||||
property color borderColor: "#222"
|
property color textColor: colorLogic.textColor
|
||||||
property color highlightColor: "orange"
|
|
||||||
property color textColor: "#eee"
|
|
||||||
|
|
||||||
style: CustomSpinBoxStyle {
|
style: CustomSpinBoxStyle {
|
||||||
|
|
||||||
|
@@ -29,8 +29,7 @@ import QtQuick.Controls.Styles 1.1
|
|||||||
|
|
||||||
Controls.SpinBox {
|
Controls.SpinBox {
|
||||||
id: spinBox
|
id: spinBox
|
||||||
property color borderColor: "#222"
|
|
||||||
property color highlightColor: "orange"
|
|
||||||
property color textColor: colorLogic.textColor
|
property color textColor: colorLogic.textColor
|
||||||
property variant backendValue;
|
property variant backendValue;
|
||||||
|
|
||||||
|
@@ -30,13 +30,12 @@ import QtQuick.Controls.Styles 1.1
|
|||||||
Controls.TabView {
|
Controls.TabView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property color textColor: "#eee"
|
|
||||||
frameVisible: false
|
frameVisible: false
|
||||||
style: TabViewStyle {
|
style: TabViewStyle {
|
||||||
frameOverlap: 0
|
frameOverlap: 0
|
||||||
frame: Item { }
|
frame: Item { }
|
||||||
tab: Rectangle {
|
tab: Rectangle {
|
||||||
color: styleData.selected ? "#eee" : "#414141"
|
color: styleData.selected ? creatorTheme.QmlDesignerTabLight : creatorTheme.QmlDesignerTabDark
|
||||||
implicitWidth: root.width/root.count + 2
|
implicitWidth: root.width/root.count + 2
|
||||||
implicitHeight: 28
|
implicitHeight: 28
|
||||||
Text {
|
Text {
|
||||||
@@ -46,21 +45,15 @@ Controls.TabView {
|
|||||||
anchors.verticalCenterOffset: -1
|
anchors.verticalCenterOffset: -1
|
||||||
text: styleData.title
|
text: styleData.title
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
color: styleData.selected ? "#333" : "#fff"
|
color: styleData.selected ? creatorTheme.QmlDesignerTabDark : creatorTheme.QmlDesignerTabLight
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#eee"
|
color:creatorTheme.QmlDesignerTabLight
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 4
|
height: 4
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
color: "#333"
|
|
||||||
width: parent.width
|
|
||||||
height: 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -58,6 +58,7 @@ RowLayout {
|
|||||||
|
|
||||||
property alias buttonRow: buttonRow
|
property alias buttonRow: buttonRow
|
||||||
|
|
||||||
|
readonly property color __defaultTextColor: creatorTheme.PanelTextColorLight
|
||||||
|
|
||||||
IconLabel {
|
IconLabel {
|
||||||
id: icon
|
id: icon
|
||||||
@@ -71,7 +72,7 @@ RowLayout {
|
|||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
text: qsTr("Target")
|
text: qsTr("Target")
|
||||||
color: "#eee"
|
color: __defaultTextColor
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
||||||
}
|
}
|
||||||
@@ -85,7 +86,7 @@ RowLayout {
|
|||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
text: "Margin"
|
text: "Margin"
|
||||||
color: "#eee"
|
color: __defaultTextColor
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ Rectangle {
|
|||||||
id: itemPane
|
id: itemPane
|
||||||
width: 320
|
width: 320
|
||||||
height: 400
|
height: 400
|
||||||
color: "#4f4f4f"
|
color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@@ -31,7 +31,7 @@ Rectangle {
|
|||||||
id: itemPane
|
id: itemPane
|
||||||
width: 320
|
width: 320
|
||||||
height: 400
|
height: 400
|
||||||
color: "#4f4f4f"
|
color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@@ -30,7 +30,7 @@ Rectangle {
|
|||||||
id: itemPane
|
id: itemPane
|
||||||
width: 320
|
width: 320
|
||||||
height: 400
|
height: 400
|
||||||
color: "#4f4f4f"
|
color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
y: -1
|
y: -1
|
||||||
|
@@ -28,10 +28,10 @@ import QtQuick.Controls 1.1
|
|||||||
import QtQuick.Controls.Styles 1.1
|
import QtQuick.Controls.Styles 1.1
|
||||||
|
|
||||||
TextFieldStyle {
|
TextFieldStyle {
|
||||||
selectionColor: "#FFFFFF"
|
selectionColor: creatorTheme.PanelTextColorLight
|
||||||
selectedTextColor: "#000000"
|
selectedTextColor: creatorTheme.PanelTextColorDark
|
||||||
textColor: "#FFFFFF"
|
textColor: creatorTheme.PanelTextColorLight
|
||||||
placeholderTextColor: "#A0A0A0"
|
placeholderTextColor: creatorTheme.PanelTextColorMid
|
||||||
|
|
||||||
padding.top: 4
|
padding.top: 4
|
||||||
padding.bottom: 4
|
padding.bottom: 4
|
||||||
@@ -39,20 +39,7 @@ TextFieldStyle {
|
|||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: font.pixelSize + padding.top + padding.bottom
|
implicitHeight: font.pixelSize + padding.top + padding.bottom
|
||||||
border.color: "#222222"
|
color: creatorTheme.FancyToolButtonSelectedColor
|
||||||
gradient: Gradient {
|
border.color: creatorTheme.QmlDesignerBackgroundColorDarker
|
||||||
GradientStop {color: "#2c2c2c" ; position: 0}
|
|
||||||
GradientStop {color: "#343434" ; position: 0.15}
|
|
||||||
GradientStop {color: "#373737" ; position: 1.0}
|
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
border.color: highlightColor
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: -1
|
|
||||||
color: "#00000000" //Qt.transparent
|
|
||||||
radius: 4
|
|
||||||
opacity: 0.3
|
|
||||||
visible: control.activeFocus
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,7 +103,7 @@ Rectangle {
|
|||||||
|
|
||||||
// as we change the background we need to change the text
|
// as we change the background we need to change the text
|
||||||
// color to see some text
|
// color to see some text
|
||||||
textColor: "#FFFFFF"
|
textColor: creatorTheme.PanelTextColorLight
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@@ -57,7 +57,7 @@ FocusScope {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: background
|
id: background
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "#4f4f4f"
|
color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -109,7 +109,7 @@ FocusScope {
|
|||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
property color buttonBaseColor: "#6f6f6f"
|
property color buttonBaseColor: Qt.darker(creatorTheme.QmlDesignerBackgroundColorDarkAlternate, 1.1)
|
||||||
color: control.hovered ? Qt.lighter(buttonBaseColor, 1.2) : buttonBaseColor
|
color: control.hovered ? Qt.lighter(buttonBaseColor, 1.2) : buttonBaseColor
|
||||||
border.width: 1
|
border.width: 1
|
||||||
Image {
|
Image {
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
VPATH += $$PWD
|
VPATH += $$PWD
|
||||||
|
|
||||||
SOURCES += modelnodecontextmenu.cpp
|
SOURCES += modelnodecontextmenu.cpp
|
||||||
|
SOURCES += theming.cpp
|
||||||
SOURCES += findimplementation.cpp
|
SOURCES += findimplementation.cpp
|
||||||
SOURCES += addsignalhandlerdialog.cpp
|
SOURCES += addsignalhandlerdialog.cpp
|
||||||
SOURCES += layoutingridlayout.cpp
|
SOURCES += layoutingridlayout.cpp
|
||||||
@@ -14,6 +15,7 @@ SOURCES += modelnodeoperations.cpp
|
|||||||
SOURCES += crumblebar.cpp
|
SOURCES += crumblebar.cpp
|
||||||
|
|
||||||
HEADERS += modelnodecontextmenu.h
|
HEADERS += modelnodecontextmenu.h
|
||||||
|
HEADERS += theming.h
|
||||||
HEADERS += findimplementation.h
|
HEADERS += findimplementation.h
|
||||||
HEADERS += addsignalhandlerdialog.h
|
HEADERS += addsignalhandlerdialog.h
|
||||||
HEADERS += layoutingridlayout.h
|
HEADERS += layoutingridlayout.h
|
||||||
|
90
src/plugins/qmldesigner/components/componentcore/theming.cpp
Normal file
90
src/plugins/qmldesigner/components/componentcore/theming.cpp
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "theming.h"
|
||||||
|
|
||||||
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
|
#include <QRegExp>
|
||||||
|
|
||||||
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
void Theming::insertTheme(QQmlPropertyMap *map)
|
||||||
|
{
|
||||||
|
const QVariantHash creatorTheme = Utils::creatorTheme()->values();
|
||||||
|
for (auto it = creatorTheme.constBegin(); it != creatorTheme.constEnd(); ++it)
|
||||||
|
map->insert(it.key(), it.value());
|
||||||
|
|
||||||
|
/* Custom Colors */
|
||||||
|
|
||||||
|
QColor darkerBackground = Utils::creatorTheme()->color(Utils::Theme::BackgroundColorDark);
|
||||||
|
|
||||||
|
if (darkerBackground.value() < 40)
|
||||||
|
darkerBackground = darkerBackground.lighter(150);
|
||||||
|
|
||||||
|
map->insert("QmlDesignerBackgroundColorDarker", darkerBackground.darker(120));
|
||||||
|
map->insert("QmlDesignerBackgroundColorLighter", darkerBackground.lighter(140));
|
||||||
|
|
||||||
|
if (darkerBackground.value() < 100)
|
||||||
|
map->insert("QmlDesignerBackgroundColorDarkAlternate", darkerBackground.lighter(120));
|
||||||
|
else
|
||||||
|
map->insert("QmlDesignerBackgroundColorDarkAlternate", darkerBackground.lighter(110));
|
||||||
|
|
||||||
|
Utils::creatorTheme()->color(Utils::Theme::PanelTextColorLight);
|
||||||
|
QColor tabLight = Utils::creatorTheme()->color(Utils::Theme::PanelTextColorLight);
|
||||||
|
QColor tabDark = Utils::creatorTheme()->color(Utils::Theme::BackgroundColorDark);
|
||||||
|
|
||||||
|
/* hack for light themes */
|
||||||
|
/* The selected tab is always supposed to be lighter */
|
||||||
|
if (tabDark.value() > tabLight.value()) {
|
||||||
|
QColor swap = tabLight.lighter(180);
|
||||||
|
tabLight = tabDark.darker(110);
|
||||||
|
tabDark = tabDark.darker(260);
|
||||||
|
}
|
||||||
|
|
||||||
|
map->insert("QmlDesignerTabLight", tabLight);
|
||||||
|
map->insert("QmlDesignerTabDark", tabDark);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Theming::replaceCssColors(const QString &input)
|
||||||
|
{
|
||||||
|
QQmlPropertyMap map;
|
||||||
|
insertTheme(&map);
|
||||||
|
QRegExp rx("creatorTheme\\.(\\w+);");
|
||||||
|
|
||||||
|
int pos = 0;
|
||||||
|
QString output = input;
|
||||||
|
|
||||||
|
while ((pos = rx.indexIn(input, pos)) != -1) {
|
||||||
|
const QString color = rx.cap(1);
|
||||||
|
output.replace("creatorTheme." + rx.cap(1), map.value(color).toString());
|
||||||
|
pos += rx.matchedLength();
|
||||||
|
}
|
||||||
|
|
||||||
|
return output;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace QmlDesigner
|
39
src/plugins/qmldesigner/components/componentcore/theming.h
Normal file
39
src/plugins/qmldesigner/components/componentcore/theming.h
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QQmlPropertyMap>
|
||||||
|
|
||||||
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
class Theming
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void insertTheme(QQmlPropertyMap *map);
|
||||||
|
static QString replaceCssColors(const QString &input);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace QmlDesigner
|
@@ -28,6 +28,7 @@
|
|||||||
#include "designersettings.h"
|
#include "designersettings.h"
|
||||||
#include "qmldesignerconstants.h"
|
#include "qmldesignerconstants.h"
|
||||||
#include "qmldesignericons.h"
|
#include "qmldesignericons.h"
|
||||||
|
#include <theming.h>
|
||||||
|
|
||||||
#include <QWheelEvent>
|
#include <QWheelEvent>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
@@ -49,7 +50,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
|||||||
: QWidget(),
|
: QWidget(),
|
||||||
m_formEditorView(view)
|
m_formEditorView(view)
|
||||||
{
|
{
|
||||||
setStyleSheet(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/formeditorstylesheet.css"))));
|
setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/formeditorstylesheet.css")))));
|
||||||
|
|
||||||
QVBoxLayout *fillLayout = new QVBoxLayout(this);
|
QVBoxLayout *fillLayout = new QVBoxLayout(this);
|
||||||
fillLayout->setMargin(0);
|
fillLayout->setMargin(0);
|
||||||
@@ -146,7 +147,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
|||||||
m_graphicsView = new FormEditorGraphicsView(this);
|
m_graphicsView = new FormEditorGraphicsView(this);
|
||||||
|
|
||||||
fillLayout->addWidget(m_graphicsView.data());
|
fillLayout->addWidget(m_graphicsView.data());
|
||||||
m_graphicsView.data()->setStyleSheet(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))));
|
m_graphicsView.data()->setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css")))));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorWidget::changeTransformTool(bool checked)
|
void FormEditorWidget::changeTransformTool(bool checked)
|
||||||
|
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "itemlibrarywidget.h"
|
#include "itemlibrarywidget.h"
|
||||||
|
|
||||||
|
#include <theming.h>
|
||||||
|
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/stylehelper.h>
|
#include <utils/stylehelper.h>
|
||||||
@@ -81,6 +83,8 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
|
|||||||
rootContext->setContextProperty(QStringLiteral("itemLibraryIconWidth"), m_itemIconSize.width());
|
rootContext->setContextProperty(QStringLiteral("itemLibraryIconWidth"), m_itemIconSize.width());
|
||||||
rootContext->setContextProperty(QStringLiteral("itemLibraryIconHeight"), m_itemIconSize.height());
|
rootContext->setContextProperty(QStringLiteral("itemLibraryIconHeight"), m_itemIconSize.height());
|
||||||
rootContext->setContextProperty(QStringLiteral("rootView"), this);
|
rootContext->setContextProperty(QStringLiteral("rootView"), this);
|
||||||
|
Theming::insertTheme(&m_themeProperties);
|
||||||
|
rootContext->setContextProperty(QLatin1String("creatorTheme"), &m_themeProperties);
|
||||||
|
|
||||||
m_itemViewQuickWidget->rootContext()->setContextProperty(QStringLiteral("highlightColor"), Utils::StyleHelper::notTooBrightHighlightColor());
|
m_itemViewQuickWidget->rootContext()->setContextProperty(QStringLiteral("highlightColor"), Utils::StyleHelper::notTooBrightHighlightColor());
|
||||||
|
|
||||||
@@ -141,8 +145,8 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
|
|||||||
setSearchFilter(QString());
|
setSearchFilter(QString());
|
||||||
|
|
||||||
/* style sheets */
|
/* style sheets */
|
||||||
setStyleSheet(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/stylesheet.css"))));
|
setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/stylesheet.css")))));
|
||||||
m_resourcesView->setStyleSheet(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))));
|
m_resourcesView->setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css")))));
|
||||||
|
|
||||||
m_qmlSourceUpdateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F5), this);
|
m_qmlSourceUpdateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F5), this);
|
||||||
connect(m_qmlSourceUpdateShortcut, SIGNAL(activated()), this, SLOT(reloadQmlSource()));
|
connect(m_qmlSourceUpdateShortcut, SIGNAL(activated()), this, SLOT(reloadQmlSource()));
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QFileIconProvider>
|
#include <QFileIconProvider>
|
||||||
#include <QQuickWidget>
|
#include <QQuickWidget>
|
||||||
|
#include <QQmlPropertyMap>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -129,6 +130,7 @@ private:
|
|||||||
QPointer<Model> m_model;
|
QPointer<Model> m_model;
|
||||||
FilterChangeFlag m_filterFlag;
|
FilterChangeFlag m_filterFlag;
|
||||||
ItemLibraryEntry m_currentitemLibraryEntry;
|
ItemLibraryEntry m_currentitemLibraryEntry;
|
||||||
|
QQmlPropertyMap m_themeProperties;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include "navigatorview.h"
|
#include "navigatorview.h"
|
||||||
#include "qmldesignerconstants.h"
|
#include "qmldesignerconstants.h"
|
||||||
#include "qmldesignericons.h"
|
#include "qmldesignericons.h"
|
||||||
|
#include <theming.h>
|
||||||
|
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
@@ -59,8 +60,8 @@ NavigatorWidget::NavigatorWidget(NavigatorView *view) :
|
|||||||
|
|
||||||
setWindowTitle(tr("Navigator", "Title of navigator view"));
|
setWindowTitle(tr("Navigator", "Title of navigator view"));
|
||||||
|
|
||||||
setStyleSheet(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/stylesheet.css"))));
|
setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/stylesheet.css")))));
|
||||||
m_treeView->setStyleSheet(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))));
|
m_treeView->setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css")))));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigatorWidget::setTreeModel(QAbstractItemModel* model)
|
void NavigatorWidget::setTreeModel(QAbstractItemModel* model)
|
||||||
|
@@ -35,6 +35,8 @@
|
|||||||
#include <variantproperty.h>
|
#include <variantproperty.h>
|
||||||
#include <bindingproperty.h>
|
#include <bindingproperty.h>
|
||||||
|
|
||||||
|
#include <theming.h>
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <qmljs/qmljssimplereader.h>
|
#include <qmljs/qmljssimplereader.h>
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -100,6 +102,9 @@ PropertyEditorQmlBackend::PropertyEditorQmlBackend(PropertyEditorView *propertyE
|
|||||||
m_contextObject->setBackendValues(&m_backendValuesPropertyMap);
|
m_contextObject->setBackendValues(&m_backendValuesPropertyMap);
|
||||||
m_contextObject->insertInQmlContext(context());
|
m_contextObject->insertInQmlContext(context());
|
||||||
|
|
||||||
|
Theming::insertTheme(&m_themeProperties);
|
||||||
|
context()->setContextProperty(QLatin1String("creatorTheme"), &m_themeProperties);
|
||||||
|
|
||||||
QObject::connect(&m_backendValuesPropertyMap, &DesignerPropertyMap::valueChanged, propertyEditor, &PropertyEditorView::changeValue);
|
QObject::connect(&m_backendValuesPropertyMap, &DesignerPropertyMap::valueChanged, propertyEditor, &PropertyEditorView::changeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
#include <nodemetainfo.h>
|
#include <nodemetainfo.h>
|
||||||
|
|
||||||
|
#include <QQmlPropertyMap>
|
||||||
|
|
||||||
class PropertyEditorValue;
|
class PropertyEditorValue;
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
@@ -101,6 +103,7 @@ private:
|
|||||||
QScopedPointer<PropertyEditorTransaction> m_propertyEditorTransaction;
|
QScopedPointer<PropertyEditorTransaction> m_propertyEditorTransaction;
|
||||||
QScopedPointer<PropertyEditorValue> m_dummyPropertyEditorValue;
|
QScopedPointer<PropertyEditorValue> m_dummyPropertyEditorValue;
|
||||||
QScopedPointer<PropertyEditorContextObject> m_contextObject;
|
QScopedPointer<PropertyEditorContextObject> m_contextObject;
|
||||||
|
QQmlPropertyMap m_themeProperties;
|
||||||
};
|
};
|
||||||
|
|
||||||
} //QmlDesigner
|
} //QmlDesigner
|
||||||
|
@@ -40,6 +40,8 @@
|
|||||||
|
|
||||||
#include <nodeabstractproperty.h>
|
#include <nodeabstractproperty.h>
|
||||||
|
|
||||||
|
#include <theming.h>
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <coreplugin/messagebox.h>
|
#include <coreplugin/messagebox.h>
|
||||||
@@ -80,8 +82,8 @@ PropertyEditorView::PropertyEditorView(QWidget *parent) :
|
|||||||
m_updateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F3), m_stackedWidget);
|
m_updateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F3), m_stackedWidget);
|
||||||
connect(m_updateShortcut, SIGNAL(activated()), this, SLOT(reloadQml()));
|
connect(m_updateShortcut, SIGNAL(activated()), this, SLOT(reloadQml()));
|
||||||
|
|
||||||
m_stackedWidget->setStyleSheet(
|
m_stackedWidget->setStyleSheet(Theming::replaceCssColors(
|
||||||
QString::fromUtf8(Utils::FileReader::fetchQrc(QStringLiteral(":/qmldesigner/stylesheet.css"))));
|
QString::fromUtf8(Utils::FileReader::fetchQrc(QStringLiteral(":/qmldesigner/stylesheet.css")))));
|
||||||
m_stackedWidget->setMinimumWidth(320);
|
m_stackedWidget->setMinimumWidth(320);
|
||||||
m_stackedWidget->move(0, 0);
|
m_stackedWidget->move(0, 0);
|
||||||
connect(m_stackedWidget, SIGNAL(resized()), this, SLOT(updateSize()));
|
connect(m_stackedWidget, SIGNAL(resized()), this, SLOT(updateSize()));
|
||||||
|
@@ -1,23 +1,16 @@
|
|||||||
|
|
||||||
QLabel {
|
|
||||||
border: none;
|
|
||||||
border-image: none;
|
|
||||||
padding: 0;
|
|
||||||
background: none;
|
|
||||||
color: #E1E1E1;
|
|
||||||
}
|
|
||||||
|
|
||||||
QStackedWidget {
|
QStackedWidget {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: #4e4e4e;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QGraphicsView {
|
QGraphicsView {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: #4e4e4e;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QGraphicsView:focus {
|
QGraphicsView:focus {
|
||||||
background-color: #5f5f5f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
QScrollBar:vertical {
|
QScrollBar:vertical {
|
||||||
background-color: #444444;
|
background-color: creatorTheme.BackgroundColorDark;
|
||||||
border: 1px solid #333333;
|
border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker;
|
||||||
margin-top: 3;
|
margin-top: 3;
|
||||||
margin-bottom: 3;
|
margin-bottom: 3;
|
||||||
width: 10;
|
width: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::handle:vertical {
|
QScrollBar::handle:vertical {
|
||||||
background-color: #656565;
|
background-color: creatorTheme.QmlDesignerBackgroundColorLighter;
|
||||||
margin-top: -5;
|
margin-top: -5;
|
||||||
margin-bottom: -5;
|
margin-bottom: -5;
|
||||||
min-height: 18px;
|
min-height: 18px;
|
||||||
width: 8px;
|
width: 8px;
|
||||||
border: 1px solid #313131;
|
border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker;
|
||||||
border-width: 1;
|
border-width: 1;
|
||||||
margin-left: -1;
|
margin-left: -1;
|
||||||
margin-right: -1;
|
margin-right: -1;
|
||||||
@@ -44,21 +44,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar:horizontal {
|
QScrollBar:horizontal {
|
||||||
background-color: #444444;
|
background-color: creatorTheme.BackgroundColorDark;
|
||||||
border: 1px solid #333333;
|
border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker;
|
||||||
margin-left: 3;
|
margin-left: 3;
|
||||||
margin-right: 3;
|
margin-right: 3;
|
||||||
height: 10;
|
height: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollBar::handle:horizontal {
|
QScrollBar::handle:horizontal {
|
||||||
background-color: #656565;
|
background-color: creatorTheme.QmlDesignerBackgroundColorLighter;
|
||||||
|
|
||||||
margin-left: -5;
|
margin-left: -5;
|
||||||
margin-right: -5;
|
margin-right: -5;
|
||||||
min-width: 18px;
|
min-width: 18px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
border: 1px solid #313131;
|
border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker;
|
||||||
border-width: 1;
|
border-width: 1;
|
||||||
margin-top: -1;
|
margin-top: -1;
|
||||||
margin-bottom: -1;
|
margin-bottom: -1;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
QFrame {
|
QFrame {
|
||||||
border: 2px;
|
border: 2px;
|
||||||
background-color: #4f4f4f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QLabel {
|
QLabel {
|
||||||
@@ -8,33 +8,33 @@ QLabel {
|
|||||||
border-image: none;
|
border-image: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: none;
|
background: none;
|
||||||
color: #E1E1E1;
|
color: creatorTheme.PanelTextColorLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QScrollArea {
|
QScrollArea {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: #4f4f4f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStackedWidget {
|
QStackedWidget {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: #4f4f4f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QGraphicsView {
|
QGraphicsView {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: #4f4f4f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabWidget {
|
QTabWidget {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: #4f4f4f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabWidget::pane { /* The tab widget frame */
|
QTabWidget::pane { /* The tab widget frame */
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: #4f4f4f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
}
|
}
|
||||||
|
|
||||||
QLineEdit
|
QLineEdit
|
||||||
@@ -47,23 +47,22 @@ QLineEdit
|
|||||||
|
|
||||||
QLineEdit#itemLibrarySearchInput
|
QLineEdit#itemLibrarySearchInput
|
||||||
{
|
{
|
||||||
color: white;
|
color: creatorTheme.PanelTextColorLight;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
border: 2px solid #0F0F0F;
|
border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker;
|
||||||
border-width: 1;
|
border-width: 1;
|
||||||
max-height: 20px;
|
max-height: 20px;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
background-color: creatorTheme.FancyToolButtonSelectedColor;
|
||||||
stop: 0 #2c2c2c, stop: 1 #333333);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeView {
|
QTreeView {
|
||||||
color: white;
|
color: creatorTheme.PanelTextColorLight;
|
||||||
selection-color: white
|
selection-color: creatorTheme.PanelTextColorLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeView::item:selected {
|
QTreeView::item:selected {
|
||||||
color: white;
|
color: creatorTheme.PanelTextColorLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeView::branch:has-siblings:!adjoins-item {
|
QTreeView::branch:has-siblings:!adjoins-item {
|
||||||
@@ -94,12 +93,12 @@ QTreeView::branch:has-siblings:!adjoins-item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QListView {
|
QListView {
|
||||||
color: white;
|
color:creatorTheme.PanelTextColorLight;
|
||||||
selection-color: white
|
selection-color: creatorTheme.PanelTextColorLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QListView::item:selected {
|
QListView::item:selected {
|
||||||
color: white;
|
color: creatorTheme.PanelTextColorLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QComboBox QAbstractItemView {
|
QComboBox QAbstractItemView {
|
||||||
@@ -124,19 +123,17 @@ QTabBar::tab {
|
|||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
font: bold;
|
font: bold;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
background-color: creatorTheme.QmlDesignerTabDark;
|
||||||
stop: 0 #3c3c3c, stop: 1 #444444);
|
|
||||||
|
|
||||||
color: #EEEEEE;
|
color: creatorTheme.QmlDesignerTabLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabBar::tab:selected {
|
QTabBar::tab:selected {
|
||||||
border: none; /* no border for a flat push button */
|
border: none; /* no border for a flat push button */
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
background-color: creatorTheme.QmlDesignerTabLight;
|
||||||
stop: 0 #EFEFEF, stop: 1 #EEEEEE);
|
color: creatorTheme.QmlDesignerTabDark;
|
||||||
color: #3c3c3c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget#itemLibrarySearchInputSpacer {
|
QWidget#itemLibrarySearchInputSpacer {
|
||||||
background-color: #eeeeee;
|
background-color: creatorTheme.QmlDesignerTabLight;
|
||||||
}
|
}
|
||||||
|
@@ -29,6 +29,8 @@
|
|||||||
#include "stateseditorimageprovider.h"
|
#include "stateseditorimageprovider.h"
|
||||||
#include "stateseditoriconprovider.h"
|
#include "stateseditoriconprovider.h"
|
||||||
|
|
||||||
|
#include <theming.h>
|
||||||
|
|
||||||
#include <invalidqmlsourceexception.h>
|
#include <invalidqmlsourceexception.h>
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
@@ -99,6 +101,9 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State
|
|||||||
|
|
||||||
rootContext()->setContextProperty(QLatin1String("canAddNewStates"), true);
|
rootContext()->setContextProperty(QLatin1String("canAddNewStates"), true);
|
||||||
|
|
||||||
|
Theming::insertTheme(&m_themeProperties);
|
||||||
|
rootContext()->setContextProperty(QLatin1String("creatorTheme"), &m_themeProperties);
|
||||||
|
|
||||||
engine()->addImageProvider(QLatin1String("icons"), new StatesEditorIconProvider());
|
engine()->addImageProvider(QLatin1String("icons"), new StatesEditorIconProvider());
|
||||||
|
|
||||||
setWindowTitle(tr("States", "Title of Editor widget"));
|
setWindowTitle(tr("States", "Title of Editor widget"));
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <QQuickWidget>
|
#include <QQuickWidget>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
#include <QQmlPropertyMap>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QShortcut;
|
class QShortcut;
|
||||||
@@ -66,6 +67,7 @@ private:
|
|||||||
QPointer<StatesEditorView> m_statesEditorView;
|
QPointer<StatesEditorView> m_statesEditorView;
|
||||||
Internal::StatesEditorImageProvider *m_imageProvider;
|
Internal::StatesEditorImageProvider *m_imageProvider;
|
||||||
QShortcut *m_qmlSourceUpdateShortcut;
|
QShortcut *m_qmlSourceUpdateShortcut;
|
||||||
|
QQmlPropertyMap m_themeProperties;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include <texteditor/textdocument.h>
|
#include <texteditor/textdocument.h>
|
||||||
#include <nodeinstanceview.h>
|
#include <nodeinstanceview.h>
|
||||||
#include <itemlibrarywidget.h>
|
#include <itemlibrarywidget.h>
|
||||||
|
#include <theming.h>
|
||||||
|
|
||||||
#include <coreplugin/modemanager.h>
|
#include <coreplugin/modemanager.h>
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
@@ -300,7 +301,7 @@ void DesignModeWidget::setup()
|
|||||||
QByteArray sheet = Utils::FileReader::fetchQrc(":/qmldesigner/stylesheet.css");
|
QByteArray sheet = Utils::FileReader::fetchQrc(":/qmldesigner/stylesheet.css");
|
||||||
sheet += Utils::FileReader::fetchQrc(":/qmldesigner/scrollbar.css");
|
sheet += Utils::FileReader::fetchQrc(":/qmldesigner/scrollbar.css");
|
||||||
sheet += "QLabel { background-color: #4f4f4f; }";
|
sheet += "QLabel { background-color: #4f4f4f; }";
|
||||||
navigationView.widget->setStyleSheet(QString::fromUtf8(sheet));
|
navigationView.widget->setStyleSheet(Theming::replaceCssColors(QString::fromUtf8(sheet)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include "bindingmodel.h"
|
#include "bindingmodel.h"
|
||||||
#include "connectionmodel.h"
|
#include "connectionmodel.h"
|
||||||
#include "dynamicpropertiesmodel.h"
|
#include "dynamicpropertiesmodel.h"
|
||||||
|
#include "theming.h"
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/coreicons.h>
|
#include <coreplugin/coreicons.h>
|
||||||
@@ -50,7 +51,7 @@ ConnectionViewWidget::ConnectionViewWidget(QWidget *parent) :
|
|||||||
setWindowTitle(tr("Connections", "Title of connection view"));
|
setWindowTitle(tr("Connections", "Title of connection view"));
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
setStyleSheet(QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/connectionview/stylesheet.css"))));
|
setStyleSheet(Theming::replaceCssColors(QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/connectionview/stylesheet.css")))));
|
||||||
|
|
||||||
//ui->tabWidget->tabBar()->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
//ui->tabWidget->tabBar()->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
|
||||||
@@ -59,14 +60,14 @@ ConnectionViewWidget::ConnectionViewWidget(QWidget *parent) :
|
|||||||
ui->tabBar->addTab(tr("Properties", "Title of dynamic properties view"));
|
ui->tabBar->addTab(tr("Properties", "Title of dynamic properties view"));
|
||||||
ui->tabBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
ui->tabBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
|
||||||
ui->connectionView->setStyleSheet(
|
ui->connectionView->setStyleSheet(Theming::replaceCssColors(
|
||||||
QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))));
|
QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css")))));
|
||||||
|
|
||||||
ui->bindingView->setStyleSheet(
|
ui->bindingView->setStyleSheet(Theming::replaceCssColors(
|
||||||
QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))));
|
QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css")))));
|
||||||
|
|
||||||
ui->dynamicPropertiesView->setStyleSheet(
|
ui->dynamicPropertiesView->setStyleSheet(Theming::replaceCssColors(
|
||||||
QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))));
|
QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css")))));
|
||||||
|
|
||||||
connect(ui->tabBar, SIGNAL(currentChanged(int)),
|
connect(ui->tabBar, SIGNAL(currentChanged(int)),
|
||||||
ui->stackedWidget, SLOT(setCurrentIndex(int)));
|
ui->stackedWidget, SLOT(setCurrentIndex(int)));
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
QFrame
|
QFrame
|
||||||
{
|
{
|
||||||
background-color: #4f4f4f;
|
background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ QComboBox QAbstractItemView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTableView {
|
QTableView {
|
||||||
color: white;
|
color: creatorTheme.PanelTextColorLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTableView::item
|
QTableView::item
|
||||||
@@ -115,7 +115,7 @@ QTableView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QWidget#widgetSpacer {
|
QWidget#widgetSpacer {
|
||||||
background-color: #eeeeee;
|
background-color: creatorTheme.QmlDesignerTabLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStackedWidget {
|
QStackedWidget {
|
||||||
@@ -128,9 +128,8 @@ QTabBar::tab:selected {
|
|||||||
border-image: none;
|
border-image: none;
|
||||||
image: none;
|
image: none;
|
||||||
|
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
background-color: creatorTheme.QmlDesignerTabLight;
|
||||||
stop: 0 #EFEFEF, stop: 1 #EEEEEE);
|
color: creatorTheme.QmlDesignerTabDark;
|
||||||
color: #3c3c3c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -143,8 +142,8 @@ QTabBar::tab {
|
|||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
font: bold;
|
font: bold;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
background-color: #444444;
|
background-color: creatorTheme.QmlDesignerTabDark;
|
||||||
color: #EEEEEE;
|
color: creatorTheme.QmlDesignerTabLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
QComboBox::menu-indicator, QComboBox::down-arrow {
|
QComboBox::menu-indicator, QComboBox::down-arrow {
|
||||||
|
@@ -381,6 +381,8 @@ Project {
|
|||||||
"componentcore/findimplementation.h",
|
"componentcore/findimplementation.h",
|
||||||
"componentcore/layoutingridlayout.cpp",
|
"componentcore/layoutingridlayout.cpp",
|
||||||
"componentcore/layoutingridlayout.h",
|
"componentcore/layoutingridlayout.h",
|
||||||
|
"componentcore/theming.cpp",
|
||||||
|
"componentcore/theming.h",
|
||||||
"componentcore/modelnodecontextmenu.cpp",
|
"componentcore/modelnodecontextmenu.cpp",
|
||||||
"componentcore/modelnodecontextmenu.h",
|
"componentcore/modelnodecontextmenu.h",
|
||||||
"componentcore/modelnodecontextmenu_helper.cpp",
|
"componentcore/modelnodecontextmenu_helper.cpp",
|
||||||
|
Reference in New Issue
Block a user