From 9892e51e1d7d21767d603dfb408ffbed7cb76a05 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:43:29 +0200 Subject: [PATCH] sidebar: description box: dont show arrows when 1 item --- .config/quickshell/modules/sidebarLeft/AiChat.qml | 1 + .config/quickshell/modules/sidebarLeft/Anime.qml | 1 + .config/quickshell/modules/sidebarLeft/DescriptionBox.qml | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/.config/quickshell/modules/sidebarLeft/AiChat.qml b/.config/quickshell/modules/sidebarLeft/AiChat.qml index 1ba6f2ca2..79946a288 100644 --- a/.config/quickshell/modules/sidebarLeft/AiChat.qml +++ b/.config/quickshell/modules/sidebarLeft/AiChat.qml @@ -252,6 +252,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) DescriptionBox { text: root.suggestionList[suggestions.selectedIndex]?.description ?? "" + showArrows: root.suggestionList.length > 1 } FlowButtonGroup { // Suggestions diff --git a/.config/quickshell/modules/sidebarLeft/Anime.qml b/.config/quickshell/modules/sidebarLeft/Anime.qml index 6efaba742..516a2c512 100644 --- a/.config/quickshell/modules/sidebarLeft/Anime.qml +++ b/.config/quickshell/modules/sidebarLeft/Anime.qml @@ -250,6 +250,7 @@ Item { DescriptionBox { // Tag suggestion description text: root.suggestionList[tagSuggestions.selectedIndex]?.description ?? "" + showArrows: root.suggestionList.length > 1 } FlowButtonGroup { // Tag suggestions diff --git a/.config/quickshell/modules/sidebarLeft/DescriptionBox.qml b/.config/quickshell/modules/sidebarLeft/DescriptionBox.qml index a3599b599..cb2f7e24b 100644 --- a/.config/quickshell/modules/sidebarLeft/DescriptionBox.qml +++ b/.config/quickshell/modules/sidebarLeft/DescriptionBox.qml @@ -7,6 +7,8 @@ import QtQuick.Layouts Item { // Tag suggestion description id: root property alias text: tagDescriptionText.text + property bool showArrows: true + property bool showTab: true visible: tagDescriptionText.text.length > 0 Layout.fillWidth: true @@ -36,17 +38,21 @@ Item { // Tag suggestion description wrapMode: Text.Wrap } KeyboardKey { + visible: root.showArrows key: "↑" } KeyboardKey { + visible: root.showArrows key: "↓" } StyledText { + visible: root.showArrows && root.showTab text: qsTr("or") font.pixelSize: Appearance.font.pixelSize.smaller } KeyboardKey { id: tagDescriptionKey + visible: root.showTab key: "Tab" Layout.alignment: Qt.AlignVCenter }