Commit 622e7234 authored by Christiaan Janssen's avatar Christiaan Janssen

QmlDesigner.PropertyEditor: changed layout combobox

parent a2ec8cc9
......@@ -44,7 +44,7 @@ GroupBox {
text: "Target"
fixedWidth: targetLabelWidth
}
SiblingComboBox {
LayoutComboBox {
itemNode: anchorBackend.itemNode
selectedItemNode: anchorBackend.topTarget
onSelectedItemNodeChanged: { anchorBackend.topTarget = selectedItemNode; }
......@@ -92,7 +92,7 @@ GroupBox {
text: "Target"
fixedWidth: targetLabelWidth
}
SiblingComboBox {
LayoutComboBox {
itemNode: anchorBackend.itemNode
selectedItemNode: anchorBackend.bottomTarget
onSelectedItemNodeChanged: { anchorBackend.bottomTarget = selectedItemNode; }
......@@ -139,7 +139,7 @@ GroupBox {
text: "Target"
fixedWidth: targetLabelWidth
}
SiblingComboBox {
LayoutComboBox {
itemNode: anchorBackend.itemNode
selectedItemNode: anchorBackend.leftTarget
onSelectedItemNodeChanged: { anchorBackend.leftTarget = selectedItemNode; }
......@@ -185,7 +185,7 @@ GroupBox {
text: "Target"
fixedWidth: targetLabelWidth
}
SiblingComboBox {
LayoutComboBox {
itemNode: anchorBackend.itemNode
selectedItemNode: anchorBackend.rightTarget
onSelectedItemNodeChanged: { anchorBackend.rightTarget = selectedItemNode; }
......@@ -231,7 +231,7 @@ GroupBox {
text: "Target"
fixedWidth: targetLabelWidth
}
SiblingComboBox {
LayoutComboBox {
itemNode: anchorBackend.itemNode
selectedItemNode: anchorBackend.horizontalTarget
onSelectedItemNodeChanged: { anchorBackend.horizontalTarget = selectedItemNode; }
......@@ -277,7 +277,7 @@ GroupBox {
text: "Target"
fixedWidth: targetLabelWidth
}
SiblingComboBox {
LayoutComboBox {
itemNode: anchorBackend.itemNode
selectedItemNode: anchorBackend.verticalTarget
onSelectedItemNodeChanged: { anchorBackend.verticalTarget = selectedItemNode; }
......
import Qt 4.6
import Bauhaus 1.0
QWidget {
id: layoutComboBox
property alias itemNode: comboBox.itemNode
property alias selectedItemNode: comboBox.selectedItemNode
property alias enabled: comboBox.enabled
property var isEnabled: comboBox.enabled
onIsEnabledChanged: {
evaluate();
}
// special: will only be valid in base state
Script {
function evaluate() {
if (!enabled) {
comboBox.setStyleSheet("color: "+scheme.disabledColor);
} else {
comboBox.setStyleSheet("QComboBox,QComboBox:on{color: "+scheme.defaultColor+"}QComboBox:off{color:"+scheme.optionsColor+"}");
}
}
}
ColorScheme { id:scheme; }
layout: HorizontalLayout {
SiblingComboBox {
id: comboBox
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment