Make the resize keys do what the fingers expect

Audited against the real Forge configuration rather than its defaults: the
bindings are still in dconf, and the extension is still installed, so both the
keys and the code behind them could be read directly.

The port was faithful. Forge's resize() grows the window for a positive amount
in every direction -- the edge only decides which side moves -- so
"increase" meant grow and "decrease" meant shrink, and Y/O/I/U mapped to Wider
and Taller exactly as they should have.

What did not survive is direction. Forge resized one named EDGE: Y pulled the
left edge leftward, O pushed the right edge rightward, and the window opened
from the side you asked for. Hyprland resizes along an axis and lets the layout
pick the border, so eight distinct behaviours collapse onto four and the
direction is not expressible at all in dwindle. Correct on paper, wrong under
the hands: the keys that used to pull a window open from one side now push it
from the other, which reads as the pair being swapped.

So the sizes are inverted from Forge's naming on purpose. Y and O shrink, B and
M grow, I and U shorten, N and Comma lengthen. Faithfulness to a mapping nobody
can feel is worth less than keys that behave the way their owner reaches for
them, and the reason is written where the next person will find it.

Also fixes the Home Assistant accessories dropdown, which looked glitchy for a
reason that was not performance. The resting card hid the instant the section
opened -- a Column skips invisible children, so everything above snapped up
while the expanded grid was still sliding open underneath. It now collapses on
the same curve and duration as the section replacing it. This was the only
control with a resting and an expanded form that swap, which is why it was the
only one that looked wrong.

Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
This commit is contained in:
Gabriel Brown
2026-08-20 13:10:17 -04:00
parent c148bae4ac
commit 3b657e0a56
2 changed files with 43 additions and 15 deletions
@@ -36,9 +36,30 @@ Item {
Rectangle {
id: restingCard
// Shown when the section is closed; the expanded grid below replaces
// it when open.
readonly property bool shown: root.hasSelection && !root.expanded
width: parent.width
height: visible ? restingGrid.implicitHeight + 20 : 0
visible: root.hasSelection && !root.expanded
// Animated, and on the same curve and duration as the Section that
// replaces it. Previously this hid the instant `expanded` flipped:
// a Column skips invisible children, so everything above snapped up
// while the expanded grid was still sliding open underneath. That
// read as a glitch rather than as an animation, and only here,
// because this is the only control with a resting and an expanded
// form that swap.
height: restingCard.shown ? restingGrid.implicitHeight + 20 : 0
visible: height > 0
clip: true
Behavior on height {
NumberAnimation {
duration: Theme.durNormal
easing.type: Easing.OutCubic
}
}
radius: Theme.cardRadius + 2
color: Theme.alpha(Theme.warn, 0.028)
border.width: 1