forked from qt-creator/qt-creator
QmlDesigner.propertyEditor: fixing color coding for LineEdit
This commit is contained in:
@@ -21,6 +21,16 @@ QWidget {
|
|||||||
evaluate();
|
evaluate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
property bool isInModel: backendValue.isInModel;
|
||||||
|
onIsInModelChanged: {
|
||||||
|
evaluate();
|
||||||
|
}
|
||||||
|
property bool isInSubState: backendValue.isInSubState;
|
||||||
|
onIsInSubStateChanged: {
|
||||||
|
evaluate();
|
||||||
|
}
|
||||||
|
|
||||||
function evaluate() {
|
function evaluate() {
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
lineEditWidget.setStyleSheet("color: "+scheme.disabledColor);
|
lineEditWidget.setStyleSheet("color: "+scheme.disabledColor);
|
||||||
@@ -42,6 +52,7 @@ QWidget {
|
|||||||
ColorScheme { id:scheme; }
|
ColorScheme { id:scheme; }
|
||||||
|
|
||||||
QLineEdit {
|
QLineEdit {
|
||||||
|
y: 2
|
||||||
id: lineEditWidget
|
id: lineEditWidget
|
||||||
styleSheet: "QLineEdit { padding-left: 32; }"
|
styleSheet: "QLineEdit { padding-left: 32; }"
|
||||||
width: lineEdit.width
|
width: lineEdit.width
|
||||||
@@ -56,16 +67,16 @@ QWidget {
|
|||||||
|
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
if (focus)
|
if (focus)
|
||||||
backendValue.lock();
|
backendValue.lock();
|
||||||
else
|
else
|
||||||
backendValue.unlock();
|
backendValue.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ExtendedFunctionButton {
|
ExtendedFunctionButton {
|
||||||
backendValue: lineEdit.backendValue
|
backendValue: lineEdit.backendValue
|
||||||
y: 4
|
y: 6
|
||||||
x: 0
|
x: 0
|
||||||
visible: lineEdit.enabled
|
visible: lineEdit.enabled
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user