mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
sidebar: description box: dont show arrows when 1 item
This commit is contained in:
parent
bf936cd0d7
commit
9892e51e1d
3 changed files with 8 additions and 0 deletions
|
|
@ -252,6 +252,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
||||||
|
|
||||||
DescriptionBox {
|
DescriptionBox {
|
||||||
text: root.suggestionList[suggestions.selectedIndex]?.description ?? ""
|
text: root.suggestionList[suggestions.selectedIndex]?.description ?? ""
|
||||||
|
showArrows: root.suggestionList.length > 1
|
||||||
}
|
}
|
||||||
|
|
||||||
FlowButtonGroup { // Suggestions
|
FlowButtonGroup { // Suggestions
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,7 @@ Item {
|
||||||
|
|
||||||
DescriptionBox { // Tag suggestion description
|
DescriptionBox { // Tag suggestion description
|
||||||
text: root.suggestionList[tagSuggestions.selectedIndex]?.description ?? ""
|
text: root.suggestionList[tagSuggestions.selectedIndex]?.description ?? ""
|
||||||
|
showArrows: root.suggestionList.length > 1
|
||||||
}
|
}
|
||||||
|
|
||||||
FlowButtonGroup { // Tag suggestions
|
FlowButtonGroup { // Tag suggestions
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ import QtQuick.Layouts
|
||||||
Item { // Tag suggestion description
|
Item { // Tag suggestion description
|
||||||
id: root
|
id: root
|
||||||
property alias text: tagDescriptionText.text
|
property alias text: tagDescriptionText.text
|
||||||
|
property bool showArrows: true
|
||||||
|
property bool showTab: true
|
||||||
|
|
||||||
visible: tagDescriptionText.text.length > 0
|
visible: tagDescriptionText.text.length > 0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -36,17 +38,21 @@ Item { // Tag suggestion description
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
KeyboardKey {
|
KeyboardKey {
|
||||||
|
visible: root.showArrows
|
||||||
key: "↑"
|
key: "↑"
|
||||||
}
|
}
|
||||||
KeyboardKey {
|
KeyboardKey {
|
||||||
|
visible: root.showArrows
|
||||||
key: "↓"
|
key: "↓"
|
||||||
}
|
}
|
||||||
StyledText {
|
StyledText {
|
||||||
|
visible: root.showArrows && root.showTab
|
||||||
text: qsTr("or")
|
text: qsTr("or")
|
||||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||||
}
|
}
|
||||||
KeyboardKey {
|
KeyboardKey {
|
||||||
id: tagDescriptionKey
|
id: tagDescriptionKey
|
||||||
|
visible: root.showTab
|
||||||
key: "Tab"
|
key: "Tab"
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue