mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
room settings button: half size, dead-centred on the room
Owner's follow-up: the button was too large — height is now 0.77 of the icon-size unit (half the previous), width follows through the derived font and padding. The below-centre offset is gone: the anchor is the room's geometric centre on BOTH axes, verified against the polygon centroids in vb coordinates (exact match on all four demo rooms). Still zooms with the plan. smoke_feedback_v2's gear assertions pinned the 2026-07-27 feedback sizes (font >= 10px, box >= 18x40) — superseded by the owner's half-size order; the contract is now 'sized from the device icon, clickable, opens the dialog'.
This commit is contained in:
@@ -410,12 +410,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
||||
already rescales with the view, so the button zooms WITH the plan
|
||||
instead of keeping a constant screen size (owner's spec). */
|
||||
.rlgearbtn {
|
||||
--gear-h: calc(var(--icon-size, 2.5cqw) * 0.7 * 2.2); /* 70% of the icon BOX (icon + padding) */
|
||||
--gear-h: calc(var(--icon-size, 2.5cqw) * 0.77); /* owner: half the previous size */
|
||||
position: absolute;
|
||||
/* anchored to the room centre, sitting one button-height below it: the
|
||||
room NAME defaults to the same centre, and dead-centred the button
|
||||
covered it. The offset is in button units, so it zooms along. */
|
||||
transform: translate(-50%, calc(-50% + var(--gear-h) * 0.95));
|
||||
/* dead-centred on the room, both axes (owner's spec) */
|
||||
transform: translate(-50%, -50%);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35em;
|
||||
|
||||
Reference in New Issue
Block a user