Skip to content

Align large-font bottom icons with battery icon when 5-digit field is hidden#7

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ui-layout-bug-icons
Draft

Align large-font bottom icons with battery icon when 5-digit field is hidden#7
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ui-layout-bug-icons

Conversation

Copy link
Copy Markdown

Copilot AI commented May 10, 2026

Large-font layouts used a separate fallback Y position for the side icons when the 5-digit bottom field was absent. In the battery-icon-only configuration, that fallback left the icons too high and overlapping the bottom fields instead of aligning with the battery icon.

  • Bottom icon alignment

    • Replaced the large-font step_width == 0 fallback icon Y with a computed position derived from the battery icon layout when the battery icon is visible.
    • Preserved the existing bottom-field-based positioning for all normal bottom-field layouts.
  • Shared battery layout helpers

    • Centralized battery icon visibility checks so icon placement and battery rendering use the same condition.
    • Extracted device-specific battery icon Y calculations for MIP and AMOLED variants to avoid duplicating layout constants.
  • Scope

    • The change is limited to the affected large-font, battery-icon-only path.
    • Other display modes and configurations keep their current layout behavior.
hidden function getBottomIconY(stepWidth as Number) as Number {
    if(propFontSize == 1 and stepWidth == 0) {
        if(isBatteryIconVisible()) {
            return getBatteryIconY() + (largeDataHeight / 2) + iconYAdj;
        }
        if(screenWidth <= 280) { return screenHeight - 28; }
        return screenHeight - 31;
    }

    return bottomFiveY + (largeDataHeight / 2) + iconYAdj;
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=5424 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.tHs6ns --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,8569068719722713245,17658074569496484656,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,11630317612776623419,14422477179299128518,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /usr/bin/chromium chromium --headless --disable-gpu --no-sandbox --screenshot=/tmp/segment34-layout-schematic.png --window-size=900,500 file:///tmp/segment34-layout-schematic.svg (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=5424 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.tHs6ns --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,8569068719722713245,17658074569496484656,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,11630317612776623419,14422477179299128518,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /usr/bin/chromium chromium --headless --disable-gpu --no-sandbox --screenshot=/tmp/segment34-layout-schematic.png --window-size=900,500 file:///tmp/segment34-layout-schematic.svg (dns block)
  • redirector.gvt1.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=5424 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.tHs6ns --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,8569068719722713245,17658074569496484656,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,11630317612776623419,14422477179299128518,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /usr/bin/chromium chromium --headless --disable-gpu --no-sandbox --screenshot=/tmp/segment34-layout-schematic.png --window-size=900,500 file:///tmp/segment34-layout-schematic.svg (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=network --no-sandbox --use-angle=swiftshader-webgl --crashpad-handler-pid=5424 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.tHs6ns --change-stack-guard-on-fork=enable --shared-files=network_parent_dirs_pipe:100,v8_context_snapshot_data:101 --field-trial-handle=3,i,8569068719722713245,17658074569496484656,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,11630317612776623419,14422477179299128518,4 --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /usr/bin/chromium chromium --headless --disable-gpu --no-sandbox --screenshot=/tmp/segment34-layout-schematic.png --window-size=900,500 file:///tmp/segment34-layout-schematic.svg (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the UI layout bug in ludw/segment34mk3 where, when using large font size and the battery icon is shown instead of the 5-digit field, the icons overlap the bottom fields. In this configuration, the icons should be vertically aligned with the battery icon instead of their current position.

Requirements:

  • Investigate the layout code responsible for rendering the icons, battery icon, and bottom fields.
  • Adjust the icon positioning only for the case where large font size is active and the battery icon is displayed instead of the 5-digit field.
  • The intended visual result is that the icons are vertically centered relative to the battery icon.
  • The user estimates the needed adjustment is roughly 15px lower than the current position; use that as a starting point, but implement based on the actual layout logic rather than hardcoding a brittle guess if a cleaner calculation is possible.
  • Keep the rest of the layout unchanged for other display modes/configurations.
  • Update or add any relevant comments if helpful.

Context:

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Fix this bug: when using font size large, battery icon shown (not 5 digit field) the icons are overlapping the bottom fields. In this case the icons should instead be aligned vertically centered with the battery icon. Eyeballing it at aound 15px down from where they are now.

Assistant: I’m waiting for your response to the approval dialog before I can continue with the fix.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Fix UI layout bug for overlapping icons with battery display Align large-font bottom icons with battery icon when 5-digit field is hidden May 10, 2026
Copilot finished work on behalf of ludw May 10, 2026 15:11
Copilot AI requested a review from ludw May 10, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants