From ffcccd38d26b501ed93596d2fd936932d890a651 Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 28 Feb 2021 22:06:04 -0400 Subject: [PATCH] Add documentation link to settings menu And make mirage x.y.z label no longer open the github page --- src/gui/MainPane/TopBar.qml | 23 +++++++++++++---------- src/icons/thin/documentation.svg | 3 +++ 2 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 src/icons/thin/documentation.svg diff --git a/src/gui/MainPane/TopBar.qml b/src/gui/MainPane/TopBar.qml index e4f40c36..a9de992f 100644 --- a/src/gui/MainPane/TopBar.qml +++ b/src/gui/MainPane/TopBar.qml @@ -17,7 +17,6 @@ Rectangle { HButton { backgroundColor: "transparent" icon.name: "settings" - toolTip.text: qsTr("Settings") onClicked: settingsMenu.open() Layout.fillHeight: true @@ -28,7 +27,7 @@ Rectangle { HMenuItem { icon.name: "more-settings" - text: qsTr("Open config folder") + text: qsTr("Open configuration folder") onTriggered: py.callCoro("get_config_dir", [], Qt.openUrlExternally) } @@ -40,6 +39,14 @@ Rectangle { py.callCoro("get_theme_dir", [], Qt.openUrlExternally) } + HMenuItem { + icon.name: "documentation" + text: qsTr("Online documentation") + onTriggered: Qt.openUrlExternally( + "https://github.com/mirukana/mirage/tree/master/docs" + ) + } + HMenuItem { icon.name: "debug" text: qsTr("Developer console") @@ -48,16 +55,12 @@ Rectangle { } } - HButton { - backgroundColor: "transparent" - + HLabel { + horizontalAlignment: HLabel.AlignHCenter + verticalAlignment: HLabel.AlignVCenter + color: theme.mainPane.topBar.nameVersionLabel text: qsTr("%1 %2") .arg(Qt.application.displayName).arg(Qt.application.version) - label.color: theme.mainPane.topBar.nameVersionLabel - toolTip.text: qsTr("Double click to open project repository") - - onDoubleClicked: - Qt.openUrlExternally("https://github.com/mirukana/mirage") Layout.fillWidth: true Layout.fillHeight: true diff --git a/src/icons/thin/documentation.svg b/src/icons/thin/documentation.svg new file mode 100644 index 00000000..17450e8a --- /dev/null +++ b/src/icons/thin/documentation.svg @@ -0,0 +1,3 @@ + + +