From 90ed1f4bea7cdc081194a9ad0b058f1dc7f13d0b Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sun, 6 Jul 2025 19:02:59 +0100 Subject: [PATCH] Update HomeAssistantGlanceView.mc Improved layout. --- source/HomeAssistantGlanceView.mc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/HomeAssistantGlanceView.mc b/source/HomeAssistantGlanceView.mc index 9f7cd6d..61add52 100644 --- a/source/HomeAssistantGlanceView.mc +++ b/source/HomeAssistantGlanceView.mc @@ -32,6 +32,8 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView { private static const scMidSep = 10; //! Margin on the right side of the glance in pixels. private static const scRightGlanceMargin = 15; + //! Internal margin for the custom template between the border and the text in pixels. + private static const scIntCustMargin = 5; //! Margin top and bottom of the rectangles in pixels. private static const scVertMargin = 5; //! Size of the rounded rectangle corners in pixels. @@ -117,9 +119,9 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView { :color => Graphics.COLOR_WHITE, :font => Graphics.FONT_XTINY, :justification => Graphics.TEXT_JUSTIFY_LEFT | Graphics.TEXT_JUSTIFY_VCENTER, - :locX => scLeftRectMargin + scRectWidth + scRightRectMargin + scMidSep, + :locX => scLeftRectMargin + scRectWidth + scRightRectMargin + scIntCustMargin, :locY => (2 * h / 6) + scVertMargin, - :width => dc.getWidth() - scLeftRectMargin - scRightGlanceMargin, + :width => dc.getWidth() - scLeftRectMargin - scRectWidth - scRightRectMargin - (2 * scIntCustMargin) - scRightGlanceMargin, :height => (4 * h / 6) - (2 * scVertMargin) }); }