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:
Matysh
2026-07-29 13:47:20 +03:00
parent 09f4dc4115
commit 0bb9282edd
4 changed files with 14 additions and 17 deletions
+5 -2
View File
@@ -9,10 +9,13 @@ const res = await page.evaluate(async () => {
const btn = sr().querySelector('.rlgearbtn'); const btn = sr().querySelector('.rlgearbtn');
out.gearButtonShown = !!btn; out.gearButtonShown = !!btn;
const cs = btn ? getComputedStyle(btn) : null; const cs = btn ? getComputedStyle(btn) : null;
out.gearReadable = cs ? parseFloat(cs.fontSize) >= 10 && cs.pointerEvents === 'auto' : null; // 2026-07-29: владелец вдвое уменьшил кнопку — контракт теперь не «не
// меньше N px», а «размер от иконки устройства и кликабельность»
out.gearReadable = cs ? parseFloat(cs.fontSize) > 0 && cs.pointerEvents === 'auto' : null;
out.gearHasLabel = btn ? btn.textContent.trim().length > 0 : null; out.gearHasLabel = btn ? btn.textContent.trim().length > 0 : null;
const box = btn?.getBoundingClientRect(); const box = btn?.getBoundingClientRect();
out.gearTapTarget = box ? box.height >= 18 && box.width >= 40 : null; // (в редакторе плана .dev скрыты display:none — сравнивать не с чем)
out.gearTapTarget = box ? box.height > 6 && box.height < 40 : null;
btn.dispatchEvent(new MouseEvent('click', { bubbles: true, composed: true })); btn.dispatchEvent(new MouseEvent('click', { bubbles: true, composed: true }));
await c.updateComplete; await c.updateComplete;
out.gearOpensDialog = c._roomDialog === true && !!c._roomEditId; out.gearOpensDialog = c._roomDialog === true && !!c._roomEditId;
+3 -5
View File
@@ -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 already rescales with the view, so the button zooms WITH the plan
instead of keeping a constant screen size (owner's spec). */ instead of keeping a constant screen size (owner's spec). */
.rlgearbtn { .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; position: absolute;
/* anchored to the room centre, sitting one button-height below it: the /* dead-centred on the room, both axes (owner's spec) */
room NAME defaults to the same centre, and dead-centred the button transform: translate(-50%, -50%);
covered it. The offset is in button units, so it zooms along. */
transform: translate(-50%, calc(-50% + var(--gear-h) * 0.95));
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 0.35em; gap: 0.35em;
+3 -5
View File
@@ -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 already rescales with the view, so the button zooms WITH the plan
instead of keeping a constant screen size (owner's spec). */ instead of keeping a constant screen size (owner's spec). */
.rlgearbtn { .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; position: absolute;
/* anchored to the room centre, sitting one button-height below it: the /* dead-centred on the room, both axes (owner's spec) */
room NAME defaults to the same centre, and dead-centred the button transform: translate(-50%, -50%);
covered it. The offset is in button units, so it zooms along. */
transform: translate(-50%, calc(-50% + var(--gear-h) * 0.95));
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 0.35em; gap: 0.35em;
+3 -5
View File
@@ -407,12 +407,10 @@ export const cardStyles = css`
already rescales with the view, so the button zooms WITH the plan already rescales with the view, so the button zooms WITH the plan
instead of keeping a constant screen size (owner's spec). */ instead of keeping a constant screen size (owner's spec). */
.rlgearbtn { .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; position: absolute;
/* anchored to the room centre, sitting one button-height below it: the /* dead-centred on the room, both axes (owner's spec) */
room NAME defaults to the same centre, and dead-centred the button transform: translate(-50%, -50%);
covered it. The offset is in button units, so it zooms along. */
transform: translate(-50%, calc(-50% + var(--gear-h) * 0.95));
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 0.35em; gap: 0.35em;