3232 }
3333 spacing: Style .marginM
3434
35- // ── Header ──────────────────────────────────────────────────────
35+ // Header
3636 RowLayout {
3737 Layout .fillWidth : true
3838 spacing: Style .marginS
5959
6060 // Connection indicator dot
6161 Rectangle {
62- width: Style .iconSizeXS
63- height: Style .iconSizeXS
62+ width: Style .marginS
63+ height: Style .marginS
6464 radius: width / 2
6565 color: {
6666 if (! root .main ? .connected )
@@ -86,21 +86,21 @@ Item {
8686 Layout .fillWidth : true
8787 }
8888
89- // ── List view ────────────────────────────────────────────────────
89+ // List view
9090 Item {
9191 Layout .fillWidth : true
9292 Layout .fillHeight : true
9393 visible: root .view === " list"
9494
95- // Empty / error states — shown only when there is nothing to list
95+ // Empty / error states - shown only when there is nothing to list
9696 ColumnLayout {
9797 anchors .centerIn : parent
9898 spacing: Style .marginM
9999 visible: ! (root .main ? .entities && root .main .entities .count > 0 )
100100
101- // Connection error
101+ // Connection error - only after a genuine drop, not during initial startup
102102 ColumnLayout {
103- visible: !! (root .main && ! root .main .connected && ! root .main .authFailed && root .main .haToken !== " " )
103+ visible: !! (root .main && ! root .main .connected && ! root .main .authFailed && root .main .haToken !== " " && root . main . isReconnecting )
104104 spacing: Style .marginM
105105
106106 NText {
@@ -159,7 +159,7 @@ Item {
159159 }
160160 }
161161
162- // Entity list — only when entities exist
162+ // Entity list - only when entities exist
163163 ListView {
164164 anchors .fill : parent
165165 clip: true
@@ -170,8 +170,7 @@ Item {
170170 delegate: Rectangle {
171171 id: entityDelegate
172172 width: ListView .view .width
173- // Base row height + optional slider rows (each Style.rowHeightM tall)
174- height: Style .rowHeightL + (showBrightness ? Style .rowHeightM : 0 ) + (showColorTemp ? Style .rowHeightM : 0 )
173+ height: Math .round (64 * Style .uiScaleRatio ) + (showBrightness ? Math .round (56 * Style .uiScaleRatio ) : 0 ) + (showColorTemp ? Math .round (56 * Style .uiScaleRatio ) : 0 )
175174 color: Color .mSurfaceVariant
176175 radius: Style .radiusM
177176 clip: true
@@ -200,7 +199,7 @@ Item {
200199 }
201200 }
202201
203- // Single fallback timer — resets isWaiting if no state update arrives
202+ // Single fallback timer - resets isWaiting if no state update arrives
204203 Timer {
205204 id: waitingTimeout
206205 running: entityDelegate .isWaiting
@@ -243,7 +242,7 @@ Item {
243242
244243 ColumnLayout {
245244 Layout .fillWidth : true
246- spacing: Style .spacingXS
245+ spacing: Style .marginXS
247246
248247 NText {
249248 text: model .friendly_name
@@ -352,7 +351,7 @@ Item {
352351 }
353352 }
354353
355- // ── Brightness slider ────────────────────────────
354+ // Brightness slider
356355 RowLayout {
357356 Layout .fillWidth : true
358357 visible: entityDelegate .showBrightness
@@ -404,11 +403,11 @@ Item {
404403 text: Math .round ((model .brightness > 0 ? model .brightness : 255 ) / 255 * 100 ) + " %"
405404 color: Color .mOnSurfaceVariant
406405 pointSize: Style .fontSizeS
407- Layout .preferredWidth : Style .iconSizeL
406+ Layout .preferredWidth : Math . round ( 44 * Style .uiScaleRatio )
408407 }
409408 }
410409
411- // ── Color temperature slider ──────────────────────
410+ // Color temperature slider
412411 RowLayout {
413412 Layout .fillWidth : true
414413 visible: entityDelegate .showColorTemp
@@ -460,15 +459,15 @@ Item {
460459 text: Math .round (1000000 / colorTempSlider .value ) + " K"
461460 color: Color .mOnSurfaceVariant
462461 pointSize: Style .fontSizeS
463- Layout .preferredWidth : Style .iconSizeL
462+ Layout .preferredWidth : Math . round ( 44 * Style .uiScaleRatio )
464463 }
465464 }
466465 }
467466 }
468467 }
469468 }
470469
471- // ── Browser view ─────────────────────────────────────────────────
470+ // Browser view
472471 BrowserView {
473472 id: browserView
474473 Layout .fillWidth : true
@@ -482,7 +481,7 @@ Item {
482481 }
483482 }
484483
485- // ── Domain helpers ────────────────────────────────────────────────────────
484+ // Domain helpers
486485
487486 function isControllable (domain ) {
488487 return [" light" , " switch" , " input_boolean" , " fan" , " cover" , " lock" ].includes (domain);
0 commit comments