Collapse inactive indicator spacing
This commit is contained in:
@@ -8,9 +8,7 @@ BarWidget {
|
|||||||
id: root
|
id: root
|
||||||
moduleName: "omarchy.indicators"
|
moduleName: "omarchy.indicators"
|
||||||
|
|
||||||
readonly property int indicatorSlotExtent: Style.space(22)
|
|
||||||
readonly property var defaultIndicatorEntries: [ "Dnd", "Reminder", "NightLight", "StayAwake", "ScreenRecording", "Dictation" ]
|
readonly property var defaultIndicatorEntries: [ "Dnd", "Reminder", "NightLight", "StayAwake", "ScreenRecording", "Dictation" ]
|
||||||
readonly property int inactiveSlotExtent: indicatorEntries.length * indicatorSlotExtent
|
|
||||||
readonly property var indicatorEntries: indicatorEntriesFromSettings(settings)
|
readonly property var indicatorEntries: indicatorEntriesFromSettings(settings)
|
||||||
property var activeIndicatorIds: []
|
property var activeIndicatorIds: []
|
||||||
property var indicatorActiveStates: ({})
|
property var indicatorActiveStates: ({})
|
||||||
@@ -204,10 +202,11 @@ BarWidget {
|
|||||||
Item {
|
Item {
|
||||||
id: inactiveHorizontalArea
|
id: inactiveHorizontalArea
|
||||||
|
|
||||||
implicitWidth: Math.max(inactiveHorizontalBlock.implicitWidth, root.inactiveSlotExtent)
|
implicitWidth: root.revealInactiveIndicators ? inactiveHorizontalBlock.implicitWidth : 0
|
||||||
implicitHeight: Math.max(inactiveHorizontalBlock.implicitHeight, root.barSize)
|
implicitHeight: Math.max(inactiveHorizontalBlock.implicitHeight, root.barSize)
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
|
clip: true
|
||||||
|
|
||||||
IndicatorBlock {
|
IndicatorBlock {
|
||||||
id: inactiveHorizontalBlock
|
id: inactiveHorizontalBlock
|
||||||
@@ -246,9 +245,10 @@ BarWidget {
|
|||||||
id: inactiveVerticalArea
|
id: inactiveVerticalArea
|
||||||
|
|
||||||
implicitWidth: Math.max(inactiveVerticalBlock.implicitWidth, root.barSize)
|
implicitWidth: Math.max(inactiveVerticalBlock.implicitWidth, root.barSize)
|
||||||
implicitHeight: Math.max(inactiveVerticalBlock.implicitHeight, root.inactiveSlotExtent)
|
implicitHeight: root.revealInactiveIndicators ? inactiveVerticalBlock.implicitHeight : 0
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
|
clip: true
|
||||||
|
|
||||||
IndicatorBlock {
|
IndicatorBlock {
|
||||||
id: inactiveVerticalBlock
|
id: inactiveVerticalBlock
|
||||||
|
|||||||
@@ -144,7 +144,6 @@ visible_default_ids='[
|
|||||||
"omarchy.clock",
|
"omarchy.clock",
|
||||||
"omarchy.weather",
|
"omarchy.weather",
|
||||||
"omarchy.system-update",
|
"omarchy.system-update",
|
||||||
"omarchy.indicators",
|
|
||||||
"omarchy.network",
|
"omarchy.network",
|
||||||
"omarchy.audio",
|
"omarchy.audio",
|
||||||
"omarchy.monitor"
|
"omarchy.monitor"
|
||||||
@@ -180,7 +179,7 @@ jq -e --argjson expected "$default_ids" --argjson visibleExpected "$visible_defa
|
|||||||
pass "default bar layout renders expected module slots"
|
pass "default bar layout renders expected module slots"
|
||||||
|
|
||||||
jq -e '
|
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.weather")) != null and
|
||||||
($center | index("omarchy.system-update")) != null and
|
($center | index("omarchy.system-update")) != null and
|
||||||
($center | index("omarchy.indicators")) != null and
|
($center | index("omarchy.indicators")) != null and
|
||||||
@@ -189,10 +188,10 @@ jq -e '
|
|||||||
' <<<"$geometry" >/dev/null || {
|
' <<<"$geometry" >/dev/null || {
|
||||||
printf 'Geometry:\n' >&2
|
printf 'Geometry:\n' >&2
|
||||||
jq . <<<"$geometry" >&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
|
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