mirror of
https://github.com/overte-org/overte.git
synced 2025-08-13 16:03:52 +02:00
Gray out anti-aliasing on forward renderer.
Added disabled property to combo-box.
This commit is contained in:
parent
44cc890de2
commit
5f7336c341
2 changed files with 16 additions and 2 deletions
|
@ -10,6 +10,7 @@ Item {
|
|||
property var _optionText: "";
|
||||
readonly property string optionText: _optionText;
|
||||
property var options: [""];
|
||||
property bool disabled: false;
|
||||
|
||||
signal valueChanged(int index);
|
||||
|
||||
|
@ -92,7 +93,7 @@ Item {
|
|||
|
||||
background: Rectangle {
|
||||
id: comboBoxBackground;
|
||||
color: "#333";
|
||||
color: disabled ? "gray" : "#333";
|
||||
radius: 10;
|
||||
width: parent.width;
|
||||
}
|
||||
|
@ -152,15 +153,18 @@ Item {
|
|||
propagateComposedEvents: true;
|
||||
|
||||
onPressed: {
|
||||
mouse.accepted = false
|
||||
if (disabled) return;
|
||||
mouse.accepted = false;
|
||||
}
|
||||
|
||||
onEntered: {
|
||||
if (disabled) return;
|
||||
backgroundElement.color = "#333";
|
||||
comboBoxBackground.color = "#444";
|
||||
}
|
||||
|
||||
onExited: {
|
||||
if (disabled) return;
|
||||
backgroundElement.color = "transparent";
|
||||
comboBoxBackground.color = "#333";
|
||||
}
|
||||
|
@ -174,6 +178,11 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
onDisabledChanged: {
|
||||
if (disabled) comboBoxBackground.color = "gray";
|
||||
else comboBoxBackground.color = "#333";
|
||||
}
|
||||
|
||||
// Updates the contents of a combobox.
|
||||
// This is only required if the desired contents needs to be gathered from a javascript function and then set after the fact.
|
||||
// Ideally, this would not be used, but sometimes you gotta do what you gotta do.
|
||||
|
|
|
@ -311,10 +311,15 @@ Flickable {
|
|||
settingText: "Anti-aliasing";
|
||||
optionIndex: Render.antialiasingMode;
|
||||
options: ["None", "TAA", "FXAA"];
|
||||
disabled: Render.renderMethod;
|
||||
|
||||
onValueChanged: {
|
||||
Render.antialiasingMode = index;
|
||||
}
|
||||
|
||||
onDisabledChanged: {
|
||||
if (disabled) setOptionIndex(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue