diff --git a/src/GUI/AircraftRatingsPanel.qml b/src/GUI/AircraftRatingsPanel.qml
index e87788007..ce7087ef9 100644
--- a/src/GUI/AircraftRatingsPanel.qml
+++ b/src/GUI/AircraftRatingsPanel.qml
@@ -18,17 +18,13 @@ ListHeaderBox
anchors.verticalCenter: parent.verticalCenter
},
- Text {
+ ClickableText {
anchors.right: parent.right
anchors.rightMargin: Style.margin
text: qsTr("Adjust minimum ratings")
anchors.verticalCenter: parent.verticalCenter
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- editRatingsPanel.visible = true
- }
+ onClicked: {
+ editRatingsPanel.visible = true
}
},
diff --git a/src/GUI/ClickableText.qml b/src/GUI/ClickableText.qml
new file mode 100644
index 000000000..a203247b3
--- /dev/null
+++ b/src/GUI/ClickableText.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import "."
+
+Text {
+ signal clicked();
+
+ color: mouse.containsMouse ? Style.themeColor : Style.baseTextColor
+
+ MouseArea {
+ id: mouse
+ hoverEnabled: true
+ anchors.fill: parent
+
+ onClicked: parent.clicked();
+ }
+}
diff --git a/src/GUI/Slider.qml b/src/GUI/Slider.qml
index f2a8abf4b..9bfd3f4b1 100644
--- a/src/GUI/Slider.qml
+++ b/src/GUI/Slider.qml
@@ -2,6 +2,7 @@ import QtQuick 2.0
import "."
Item {
+ id: root
property alias label: labelText.text
property int min: 0
@@ -39,6 +40,18 @@ Item {
width: parent.width * __percentFull
}
+ MouseArea {
+ id: clickTrackArea
+ anchors.centerIn: parent
+ width: parent.width
+ height: root.height
+
+ onClicked: {
+ var frac = mouse.x / width;
+ root.value = min + 0.5 + (max - min) * frac;
+ }
+ }
+
// invisble item that moves directly with the mouse
Item {
id: dragThumb
diff --git a/src/GUI/resources.qrc b/src/GUI/resources.qrc
index 63c068d55..f0d93bd4b 100644
--- a/src/GUI/resources.qrc
+++ b/src/GUI/resources.qrc
@@ -55,6 +55,7 @@
UpdateAllPanel.qml
Style.qml
qmldir
+ ClickableText.qml
preview-close.png