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