mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Collapse inactive indicator spacing
This commit is contained in:
@@ -8,9 +8,7 @@ BarWidget {
|
||||
id: root
|
||||
moduleName: "omarchy.indicators"
|
||||
|
||||
readonly property int indicatorSlotExtent: Style.space(22)
|
||||
readonly property var defaultIndicatorEntries: [ "Dnd", "Reminder", "NightLight", "StayAwake", "ScreenRecording", "Dictation" ]
|
||||
readonly property int inactiveSlotExtent: indicatorEntries.length * indicatorSlotExtent
|
||||
readonly property var indicatorEntries: indicatorEntriesFromSettings(settings)
|
||||
property var activeIndicatorIds: []
|
||||
property var indicatorActiveStates: ({})
|
||||
@@ -204,10 +202,11 @@ BarWidget {
|
||||
Item {
|
||||
id: inactiveHorizontalArea
|
||||
|
||||
implicitWidth: Math.max(inactiveHorizontalBlock.implicitWidth, root.inactiveSlotExtent)
|
||||
implicitWidth: root.revealInactiveIndicators ? inactiveHorizontalBlock.implicitWidth : 0
|
||||
implicitHeight: Math.max(inactiveHorizontalBlock.implicitHeight, root.barSize)
|
||||
width: implicitWidth
|
||||
height: implicitHeight
|
||||
clip: true
|
||||
|
||||
IndicatorBlock {
|
||||
id: inactiveHorizontalBlock
|
||||
@@ -246,9 +245,10 @@ BarWidget {
|
||||
id: inactiveVerticalArea
|
||||
|
||||
implicitWidth: Math.max(inactiveVerticalBlock.implicitWidth, root.barSize)
|
||||
implicitHeight: Math.max(inactiveVerticalBlock.implicitHeight, root.inactiveSlotExtent)
|
||||
implicitHeight: root.revealInactiveIndicators ? inactiveVerticalBlock.implicitHeight : 0
|
||||
width: implicitWidth
|
||||
height: implicitHeight
|
||||
clip: true
|
||||
|
||||
IndicatorBlock {
|
||||
id: inactiveVerticalBlock
|
||||
|
||||
@@ -144,7 +144,6 @@ visible_default_ids='[
|
||||
"omarchy.clock",
|
||||
"omarchy.weather",
|
||||
"omarchy.system-update",
|
||||
"omarchy.indicators",
|
||||
"omarchy.network",
|
||||
"omarchy.audio",
|
||||
"omarchy.monitor"
|
||||
@@ -180,7 +179,7 @@ jq -e --argjson expected "$default_ids" --argjson visibleExpected "$visible_defa
|
||||
pass "default bar layout renders expected module slots"
|
||||
|
||||
jq -e '
|
||||
map(select(.section == "center" and .visible == true and .width > 0)) | map(.id) as $center |
|
||||
map(select(.section == "center")) | map(.id) as $center |
|
||||
($center | index("omarchy.weather")) != null and
|
||||
($center | index("omarchy.system-update")) != null and
|
||||
($center | index("omarchy.indicators")) != null and
|
||||
@@ -189,10 +188,10 @@ jq -e '
|
||||
' <<<"$geometry" >/dev/null || {
|
||||
printf 'Geometry:\n' >&2
|
||||
jq . <<<"$geometry" >&2
|
||||
fail_with_log "runtime geometry places visible update between weather and indicators"
|
||||
fail_with_log "runtime geometry keeps update before indicators"
|
||||
}
|
||||
|
||||
pass "runtime geometry places visible update between weather and indicators"
|
||||
pass "runtime geometry keeps update before indicators"
|
||||
|
||||
HOME="$test_home" OMARCHY_PATH="$test_root" PATH="$ROOT/bin:$PATH" "$ROOT/bin/omarchy-config-shell-bar" remove omarchy.audio
|
||||
|
||||
|
||||
Reference in New Issue
Block a user