[Bug]: [Cosmetic] Misaligned Tab and MacOS Window Button on Custom Themes #2874

Open
opened 2026-11-05 12:18:09 +00:00 by Cmion · 3 comments
Cmion commented 2026-11-05 12:18:09 +00:00 (Migrated from github.com)

Operating system

macOS

Version

0.20.2.1 (Official Build, Chromium 156.0.8078.73) (arm64)

Have you tested that this is not an upstream issue or an issue with your configuration?

  • I have tried reproducing this issue in Chrome and it could not be reproduced there
  • I have tried reproducing this issue in ungoogled-chromium and it could not be reproduced there
  • I have tried reproducing this issue in Helium with a new and empty profile using --user-data-dir command line argument and it could not be reproduced there

Description

There's a height mismatch in the Tab Layout of Helium's Classic Layout. Where there is a height mismatch between the Forward and Back button container and the Address bar container height (Depends on how you look at it, it could also be that the tab container height is larger than the MacOS window manager buttons container height). This is noticeable when using custom themes. I have added steps to reproduce.

Crash ID

No response

How to Reproduce?

  1. Go to https://chromewebstore.google.com/collection/chrome_color_themes
  2. Pick Any Theme (ie Slate)
  3. Look at the visual mismatch between the tabs and the MacOS window buttons
    NB: Make sure in helium://settings/ you are using the Classic Layout.

I have attached screenshots to show this in action

Helium
Image

Image

Chrome

Image

Actual behavior

There's a simple ui/visual height mismatch between the back/forward button container and the address bar container when using custom themes

Expected behavior

There heights between the address bar container and the forward and back button should be uniform. and the height of both the tab layout and the window manager button (container) should be uniform.

Additional context

Image Image
### Operating system macOS ### Version 0.20.2.1 (Official Build, Chromium 156.0.8078.73) (arm64) ### Have you tested that this is not an upstream issue or an issue with your configuration? - [x] I have tried reproducing this issue in Chrome and it could not be reproduced there - [ ] I have tried reproducing this issue in ungoogled-chromium and it could not be reproduced there - [x] I have tried reproducing this issue in Helium with a new and empty profile using `--user-data-dir` command line argument and it could not be reproduced there ### Description There's a height mismatch in the Tab Layout of Helium's Classic Layout. Where there is a height mismatch between the Forward and Back button container and the Address bar container height (Depends on how you look at it, it could also be that the tab container height is larger than the MacOS window manager buttons container height). This is noticeable when using custom themes. I have added steps to reproduce. ### Crash ID _No response_ ### How to Reproduce? 1. Go to https://chromewebstore.google.com/collection/chrome_color_themes 2. Pick Any Theme (ie Slate) 3. Look at the visual mismatch between the tabs and the MacOS window buttons NB: Make sure in helium://settings/ you are using the Classic Layout. I have attached screenshots to show this in action Helium <img width="281" height="114" alt="Image" src="https://github.com/user-attachments/assets/1a50b622-39d2-4dff-9d7f-bde86fb40716" /> <img width="312" height="114" alt="Image" src="https://github.com/user-attachments/assets/806fbc63-4212-4049-a37f-039dd2ddc053" /> Chrome <img width="241" height="130" alt="Image" src="https://github.com/user-attachments/assets/fbaf70db-efc4-497e-87da-41e4a542f5f1" /> ### Actual behavior There's a simple ui/visual height mismatch between the back/forward button container and the address bar container when using custom themes ### Expected behavior There heights between the address bar container and the forward and back button should be uniform. and the height of both the tab layout and the window manager button (container) should be uniform. ### Additional context <img width="281" height="114" alt="Image" src="https://github.com/user-attachments/assets/85d9884e-6fb6-48ef-ba2a-d075d2a0f9b6" /> <img width="258" height="112" alt="Image" src="https://github.com/user-attachments/assets/e1eaac59-4f13-4b6b-bf94-a0287f799c40" />
leightonhughes commented 2026-11-13 05:53:44 +00:00 (Migrated from github.com)

Reproduced a similar Classic-layout misalignment on Linux (Omarchy, Helium 0.21.2.1 / Chromium 157.0.8103.50). This investigation was assisted by Codex; the macOS case has not been tested.

Before / after

These are actual native browser screenshots at 2× scale. The “after” image uses a runtime geometry adjustment, not a rebuilt binary.

Before:

Before: six-pixel background step

After:

After: aligned background and restored address-bar spacing

Finding and proposed change

In BrowserViewTabbedLayoutImpl::CalculateProposedLayout, the non-dynamic horizontal-tab path subtracts kHeliumBasePadding (3 logical pixels) from the tab-strip bottom to position the toolbar. Helium's dedicated kTabstripToolbarOverlap is 0. With contrasting frame/toolbar colours, that overlap produces the stepped background beneath the window controls and reduces the space above the address bar. No font metrics needed changing in the runtime experiment.

Proposed change in chrome/browser/ui/views/frame/layout/browser_view_tabbed_layout_impl.cc (the released source after applying Helium's patch series):

-        const int default_tabstrip_toolbar_overlap =
-            ScaleExtent(GetLayoutConstant(LayoutConstant::kHeliumBasePadding),
-                        zen.top_chrome_ratio);
+        const int default_tabstrip_toolbar_overlap = ScaleExtent(
+            GetLayoutConstant(LayoutConstant::kTabstripToolbarOverlap),
+            zen.top_chrome_ratio);

This retains the frameless-animation scaling and leaves the separate Dynamic-layout calculation unchanged.

Source references at the tested release's shared-source commit: dynamic.patch, layout constants, and zen-mode.patch.

Verification

Used the released binary mounted read-only in a network-isolated Docker container with Xvfb/Openbox, fresh disposable profiles and a synthetic contrasting theme. The everyday installation and profile were unchanged.

Chromium's native UI DevTools reported the tab-strip region at y=0, height=34, and TopContainerView at y=31. Moving only that container to y=34 removed both visible symptoms; restoring y=31 brought them back. Bounds were read back after each change, and screenshot pixel assertions measured the frame-background step.

Test Before Adjusted Reverted
2× scale, Classic, frameless off 6 physical px 0 6
1× scale, Classic, frameless on/pinned 3 physical px 0 3

The affected source file was reconstructed from Chromium 157.0.8103.50 plus all 10 applicable release patches, in series order, with zero fuzz. The candidate patch passed forward and reverse dry-run application checks.

Limit: this is native runtime geometry verification, not a compiled patched browser. The inspector manually applies the proposed toolbar position; it does not execute the changed C++. Resizing, fullscreen, animation, dependent content layout and macOS still need validation in a rebuilt browser.

History

The 4 November update to frame-background.patch changed offsets and a build dependency, not painting behaviour. The 12 October theme changes switched tab-strip backgrounds to the frame theme and likely made the existing overlap visible. The base-padding substitution dates to this March change. No historical-binary bisect was performed, so this does not establish a first bad release.

Reproduced a similar Classic-layout misalignment on Linux (Omarchy, Helium 0.21.2.1 / Chromium 157.0.8103.50). This investigation was assisted by Codex; the macOS case has not been tested. ### Before / after These are actual native browser screenshots at 2× scale. The “after” image uses a runtime geometry adjustment, not a rebuilt binary. **Before:** ![Before: six-pixel background step](https://github.com/user-attachments/assets/6c05ad07-be74-4da6-9a58-65f3420f55ec) **After:** ![After: aligned background and restored address-bar spacing](https://github.com/user-attachments/assets/b7b720db-24a0-4ce3-bba1-a54e8e8da4b4) ### Finding and proposed change In `BrowserViewTabbedLayoutImpl::CalculateProposedLayout`, the non-dynamic horizontal-tab path subtracts `kHeliumBasePadding` (3 logical pixels) from the tab-strip bottom to position the toolbar. Helium's dedicated `kTabstripToolbarOverlap` is 0. With contrasting frame/toolbar colours, that overlap produces the stepped background beneath the window controls and reduces the space above the address bar. No font metrics needed changing in the runtime experiment. Proposed change in `chrome/browser/ui/views/frame/layout/browser_view_tabbed_layout_impl.cc` (the released source after applying Helium's patch series): ```diff - const int default_tabstrip_toolbar_overlap = - ScaleExtent(GetLayoutConstant(LayoutConstant::kHeliumBasePadding), - zen.top_chrome_ratio); + const int default_tabstrip_toolbar_overlap = ScaleExtent( + GetLayoutConstant(LayoutConstant::kTabstripToolbarOverlap), + zen.top_chrome_ratio); ``` This retains the frameless-animation scaling and leaves the separate Dynamic-layout calculation unchanged. Source references at the tested release's shared-source commit: [dynamic.patch](https://github.com/imputnet/helium/blob/e817502a99428528264c31268a8554e5ba63bd2c/patches/helium/ui/layout/dynamic.patch), [layout constants](https://github.com/imputnet/helium/blob/e817502a99428528264c31268a8554e5ba63bd2c/patches/helium/ui/layout-constants.patch), and [zen-mode.patch](https://github.com/imputnet/helium/blob/e817502a99428528264c31268a8554e5ba63bd2c/patches/helium/ui/layout/zen-mode.patch). ### Verification Used the released binary mounted read-only in a network-isolated Docker container with Xvfb/Openbox, fresh disposable profiles and a synthetic contrasting theme. The everyday installation and profile were unchanged. Chromium's native UI DevTools reported the tab-strip region at y=0, height=34, and `TopContainerView` at y=31. Moving only that container to y=34 removed both visible symptoms; restoring y=31 brought them back. Bounds were read back after each change, and screenshot pixel assertions measured the frame-background step. | Test | Before | Adjusted | Reverted | | --- | ---: | ---: | ---: | | 2× scale, Classic, frameless off | 6 physical px | 0 | 6 | | 1× scale, Classic, frameless on/pinned | 3 physical px | 0 | 3 | The affected source file was reconstructed from Chromium 157.0.8103.50 plus all 10 applicable release patches, in series order, with zero fuzz. The candidate patch passed forward and reverse dry-run application checks. **Limit:** this is native runtime geometry verification, not a compiled patched browser. The inspector manually applies the proposed toolbar position; it does not execute the changed C++. Resizing, fullscreen, animation, dependent content layout and macOS still need validation in a rebuilt browser. ### History The [4 November update to frame-background.patch](https://github.com/imputnet/helium/commit/f3407ff21df8d520d5f861e5162e1a358e038ed9) changed offsets and a build dependency, not painting behaviour. The [12 October theme changes](https://github.com/imputnet/helium/commit/888f0fb4ee5efa66b3f23230bbbf751682162281) switched tab-strip backgrounds to the frame theme and likely made the existing overlap visible. The base-padding substitution dates to [this March change](https://github.com/imputnet/helium/commit/1d34cd53d2a0f11ffcebf2216b96fab659dc28de). No historical-binary bisect was performed, so this does not establish a first bad release.
leightonhughes commented 2026-11-13 05:53:44 +00:00 (Migrated from github.com)

Reproduced a similar Classic-layout misalignment on Linux (Omarchy, Helium 0.21.2.1 / Chromium 157.0.8103.50). This investigation was assisted by Codex; the macOS case has not been tested.

Before / after

These are actual native browser screenshots at 2× scale. The “after” image uses a runtime geometry adjustment, not a rebuilt binary.

Before:

Before: six-pixel background step

After:

After: aligned background and restored address-bar spacing

Finding and proposed change

In BrowserViewTabbedLayoutImpl::CalculateProposedLayout, the non-dynamic horizontal-tab path subtracts kHeliumBasePadding (3 logical pixels) from the tab-strip bottom to position the toolbar. Helium's dedicated kTabstripToolbarOverlap is 0. With contrasting frame/toolbar colours, that overlap produces the stepped background beneath the window controls and reduces the space above the address bar. No font metrics needed changing in the runtime experiment.

Proposed change in chrome/browser/ui/views/frame/layout/browser_view_tabbed_layout_impl.cc (the released source after applying Helium's patch series):

-        const int default_tabstrip_toolbar_overlap =
-            ScaleExtent(GetLayoutConstant(LayoutConstant::kHeliumBasePadding),
-                        zen.top_chrome_ratio);
+        const int default_tabstrip_toolbar_overlap = ScaleExtent(
+            GetLayoutConstant(LayoutConstant::kTabstripToolbarOverlap),
+            zen.top_chrome_ratio);

This retains the frameless-animation scaling and leaves the separate Dynamic-layout calculation unchanged.

Source references at the tested release's shared-source commit: dynamic.patch, layout constants, and zen-mode.patch.

Verification

Used the released binary mounted read-only in a network-isolated Docker container with Xvfb/Openbox, fresh disposable profiles and a synthetic contrasting theme. The everyday installation and profile were unchanged.

Chromium's native UI DevTools reported the tab-strip region at y=0, height=34, and TopContainerView at y=31. Moving only that container to y=34 removed both visible symptoms; restoring y=31 brought them back. Bounds were read back after each change, and screenshot pixel assertions measured the frame-background step.

Test Before Adjusted Reverted
2× scale, Classic, frameless off 6 physical px 0 6
1× scale, Classic, frameless on/pinned 3 physical px 0 3

The affected source file was reconstructed from Chromium 157.0.8103.50 plus all 10 applicable release patches, in series order, with zero fuzz. The candidate patch passed forward and reverse dry-run application checks.

Limit: this is native runtime geometry verification, not a compiled patched browser. The inspector manually applies the proposed toolbar position; it does not execute the changed C++. Resizing, fullscreen, animation, dependent content layout and macOS still need validation in a rebuilt browser.

History

The 4 November update to frame-background.patch changed offsets and a build dependency, not painting behaviour. The 12 October theme changes switched tab-strip backgrounds to the frame theme and likely made the existing overlap visible. The base-padding substitution dates to this March change. No historical-binary bisect was performed, so this does not establish a first bad release.

Reproduced a similar Classic-layout misalignment on Linux (Omarchy, Helium 0.21.2.1 / Chromium 157.0.8103.50). This investigation was assisted by Codex; the macOS case has not been tested. ### Before / after These are actual native browser screenshots at 2× scale. The “after” image uses a runtime geometry adjustment, not a rebuilt binary. **Before:** ![Before: six-pixel background step](https://github.com/user-attachments/assets/6c05ad07-be74-4da6-9a58-65f3420f55ec) **After:** ![After: aligned background and restored address-bar spacing](https://github.com/user-attachments/assets/b7b720db-24a0-4ce3-bba1-a54e8e8da4b4) ### Finding and proposed change In `BrowserViewTabbedLayoutImpl::CalculateProposedLayout`, the non-dynamic horizontal-tab path subtracts `kHeliumBasePadding` (3 logical pixels) from the tab-strip bottom to position the toolbar. Helium's dedicated `kTabstripToolbarOverlap` is 0. With contrasting frame/toolbar colours, that overlap produces the stepped background beneath the window controls and reduces the space above the address bar. No font metrics needed changing in the runtime experiment. Proposed change in `chrome/browser/ui/views/frame/layout/browser_view_tabbed_layout_impl.cc` (the released source after applying Helium's patch series): ```diff - const int default_tabstrip_toolbar_overlap = - ScaleExtent(GetLayoutConstant(LayoutConstant::kHeliumBasePadding), - zen.top_chrome_ratio); + const int default_tabstrip_toolbar_overlap = ScaleExtent( + GetLayoutConstant(LayoutConstant::kTabstripToolbarOverlap), + zen.top_chrome_ratio); ``` This retains the frameless-animation scaling and leaves the separate Dynamic-layout calculation unchanged. Source references at the tested release's shared-source commit: [dynamic.patch](https://github.com/imputnet/helium/blob/e817502a99428528264c31268a8554e5ba63bd2c/patches/helium/ui/layout/dynamic.patch), [layout constants](https://github.com/imputnet/helium/blob/e817502a99428528264c31268a8554e5ba63bd2c/patches/helium/ui/layout-constants.patch), and [zen-mode.patch](https://github.com/imputnet/helium/blob/e817502a99428528264c31268a8554e5ba63bd2c/patches/helium/ui/layout/zen-mode.patch). ### Verification Used the released binary mounted read-only in a network-isolated Docker container with Xvfb/Openbox, fresh disposable profiles and a synthetic contrasting theme. The everyday installation and profile were unchanged. Chromium's native UI DevTools reported the tab-strip region at y=0, height=34, and `TopContainerView` at y=31. Moving only that container to y=34 removed both visible symptoms; restoring y=31 brought them back. Bounds were read back after each change, and screenshot pixel assertions measured the frame-background step. | Test | Before | Adjusted | Reverted | | --- | ---: | ---: | ---: | | 2× scale, Classic, frameless off | 6 physical px | 0 | 6 | | 1× scale, Classic, frameless on/pinned | 3 physical px | 0 | 3 | The affected source file was reconstructed from Chromium 157.0.8103.50 plus all 10 applicable release patches, in series order, with zero fuzz. The candidate patch passed forward and reverse dry-run application checks. **Limit:** this is native runtime geometry verification, not a compiled patched browser. The inspector manually applies the proposed toolbar position; it does not execute the changed C++. Resizing, fullscreen, animation, dependent content layout and macOS still need validation in a rebuilt browser. ### History The [4 November update to frame-background.patch](https://github.com/imputnet/helium/commit/f3407ff21df8d520d5f861e5162e1a358e038ed9) changed offsets and a build dependency, not painting behaviour. The [12 October theme changes](https://github.com/imputnet/helium/commit/888f0fb4ee5efa66b3f23230bbbf751682162281) switched tab-strip backgrounds to the frame theme and likely made the existing overlap visible. The base-padding substitution dates to [this March change](https://github.com/imputnet/helium/commit/1d34cd53d2a0f11ffcebf2216b96fab659dc28de). No historical-binary bisect was performed, so this does not establish a first bad release.
Lemvo commented 2026-11-13 20:15:25 +00:00 (Migrated from github.com)

Also happening on Windows 11 (25H2), Helium 0.21.2.1, 150% scaling.
Using: classic layout, custom theme with frame 31,31,31 and toolbar 52,52,52.

The step under the caption buttons measures 4 physical px, consistent with the 3 logical px overlap identified above.

Toolbar top edge misaligned
Also happening on **Windows 11** (25H2), Helium 0.21.2.1, 150% scaling. Using: classic layout, custom theme with frame 31,31,31 and toolbar 52,52,52. The step under the caption buttons measures 4 physical px, consistent with the 3 logical px overlap identified above. <img width="1245" height="483" alt="Toolbar top edge misaligned" src="https://github.com/user-attachments/assets/9f3b4e6e-db1a-48c2-96b0-d18c8033e4e6" />
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
imputnet/helium#2874
No description provided.