Files
omarchy/plugins/io.github.elevate08.qs-bitwarden-cli/FormPickerRow.qml
T
asepharyana 1cdb82a76f Sync config from arch
- hypr/apps.lua
- hypr/autostart.lua
- hypr/envs.lua
- hypr/hyprland.lua
- hypr/hyprsunset.conf
- hypr/input.lua
- hypr/looknfeel.lua
- hypr/omasettings.lua
- hypr/xdph.conf
- omarchy/branding/about.txt
- omarchy/branding/screensaver.txt
- omarchy/extensions/omarchy-menu.jsonc
- omarchy/hooks/battery-low.d/play-warning-sound.sample
- omarchy/hooks/font-set.d/show-font-notification.sample
- omarchy/hooks/post-boot.d/weather.sample
- omarchy/hooks/post-update.d/install-voxtype.hook
- omarchy/hooks/post-update.d/setup-agent.hook
- omarchy/hooks/post-update.d/setup-fingerprint.hook
- omarchy/hooks/post-update.d/show-update-notification.sample
- omarchy/hooks/pre-refresh-pacman.d/add-custom-repo.sample
- omarchy/hooks/theme-set.d/show-theme-notification.sample
- omarchy/shell.json
- omarchy/shell.toml
- omarchy/theme.name
- omarchy/themes/azure-glow/README.md
- omarchy/themes/azure-glow/alacritty.toml
- omarchy/themes/azure-glow/btop.theme
- omarchy/themes/azure-glow/hyprland.conf
- omarchy/themes/azure-glow/hyprlock.conf
- omarchy/themes/azure-glow/icons.theme
- … 269 more
2026-09-23 15:19:12 +07:00

74 lines
2.2 KiB
QML

import QtQuick
import qs.Commons
import qs.Ui
// One row in an item-form picker: folder, organization, or collection.
//
// `multi` distinguishes the two behaviours. A folder or organization is a
// single choice, so its mark is a tick; a collection is one of several an item
// may belong to, so its mark is a checkbox that reads as toggleable.
BorderSurface {
id: row
property string label: ""
property string glyph: ""
property bool picked: false
property bool multi: false
property color foreground: Color.foreground
property string fontFamily: Style.font.family
signal activated()
implicitHeight: Style.space(28)
radius: Style.cornerRadius
color: picked ? Style.selectedFillFor(foreground, Color.accent)
: (mouse.containsMouse ? Style.hoverFillFor(foreground, Color.accent) : "transparent")
borderSpec: Border.surfaceSpec("menu", "border", picked ? Color.accent : "transparent", picked ? 1 : 0)
MouseArea {
id: mouse
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: row.activated()
}
Row {
anchors.fill: parent
anchors.leftMargin: Style.space(9)
anchors.rightMargin: Style.space(9)
spacing: Style.space(8)
Text {
textFormat: Text.PlainText
anchors.verticalCenter: parent.verticalCenter
text: row.glyph
color: row.picked ? Color.accent : Qt.darker(row.foreground, 1.5)
font.family: row.fontFamily
font.pixelSize: Style.font.bodySmall
}
Text {
textFormat: Text.PlainText
anchors.verticalCenter: parent.verticalCenter
width: parent.width - Style.space(46)
text: row.label
color: row.picked ? Color.accent : row.foreground
font.family: row.fontFamily
font.pixelSize: Style.font.bodySmall
font.bold: row.picked
elide: Text.ElideRight
}
Text {
textFormat: Text.PlainText
anchors.verticalCenter: parent.verticalCenter
visible: row.multi || row.picked
text: row.multi ? (row.picked ? "󰄲" : "󰄱") : "󰄬"
color: row.picked ? Color.accent : Qt.darker(row.foreground, 1.6)
font.family: row.fontFamily
font.pixelSize: Style.font.bodySmall
}
}
}