forked from qt-creator/qt-creator
QmlDesigner.PropertyEditor: Color coding for LineEdit
This commit is contained in:
@@ -33,6 +33,7 @@ QExtGroupBox {
|
|||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
backendValue: colorGroupBox.backendColor
|
backendValue: colorGroupBox.backendColor
|
||||||
|
baseStateFlag: isBaseState
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorButton {
|
ColorButton {
|
||||||
|
|||||||
@@ -7,9 +7,19 @@ QWidget {
|
|||||||
property var backendValue
|
property var backendValue
|
||||||
property alias enabled: lineEdit.enabled
|
property alias enabled: lineEdit.enabled
|
||||||
property var baseStateFlag
|
property var baseStateFlag
|
||||||
|
property alias text: lineEditWidget.text
|
||||||
|
|
||||||
minimumHeight: 24;
|
minimumHeight: 24;
|
||||||
|
|
||||||
|
onBaseStateFlagChanged: {
|
||||||
|
evaluate();
|
||||||
|
}
|
||||||
|
|
||||||
|
property var isEnabled: comboBox.enabled
|
||||||
|
onIsEnabledChanged: {
|
||||||
|
evaluate();
|
||||||
|
}
|
||||||
|
|
||||||
Script {
|
Script {
|
||||||
function evaluate() {
|
function evaluate() {
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
@@ -42,6 +52,7 @@ QWidget {
|
|||||||
|
|
||||||
onTextEdited: {
|
onTextEdited: {
|
||||||
backendValue.value = text
|
backendValue.value = text
|
||||||
|
evaluate();
|
||||||
}
|
}
|
||||||
|
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ GroupBox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorLabel {
|
ColorLabel {
|
||||||
text: " Color"
|
text: " Color"
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorGroupBox {
|
ColorGroupBox {
|
||||||
@@ -73,18 +73,18 @@ GroupBox {
|
|||||||
|
|
||||||
backendColor: backendValues.color
|
backendColor: backendValues.color
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorLabel {
|
ColorLabel {
|
||||||
visible: showStyleColor
|
visible: showStyleColor
|
||||||
text: " Style Color"
|
text: " Style Color"
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorGroupBox {
|
ColorGroupBox {
|
||||||
visible: showStyleColor
|
visible: showStyleColor
|
||||||
finished: finishedNotify
|
finished: finishedNotify
|
||||||
|
|
||||||
backendColor: backendValues.styleColor || null
|
backendColor: backendValues.styleColor || null
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user