Skip to content

fix: honor buttons-side preference in the classic titlebar#5

Open
p134c0d3 wants to merge 1 commit into
singularityos-lab:mainfrom
p134c0d3:fix/classic-titlebar-buttons-side
Open

fix: honor buttons-side preference in the classic titlebar#5
p134c0d3 wants to merge 1 commit into
singularityos-lab:mainfrom
p134c0d3:fix/classic-titlebar-buttons-side

Conversation

@p134c0d3

Copy link
Copy Markdown
Contributor

The classic (legacy static) titlebar honored the Buttons Side setting only for visibility, not placement. ToolBar.apply_button_layout() toggled the minimize/maximize/close controls on and off but always left them in the trailing box, so switching Buttons Side to Left did nothing — the controls stayed pinned to the right. The floating hover-control path (HoverControls) already handled sides correctly, so the two titlebar modes disagreed.

Fix

  • Parse button-layout into leading/trailing sides and reparent the controls to the chosen edge, at the extreme leading/trailing position.
  • Reuse the exact same cluster-side logic as HoverControls (close_left || (!close_right && (min_left || max_left))) so both titlebar modes agree.
  • Skip reflowing/showing the in-toolbar controls in SSD mode, where the compositor draws the decorations (previously a live layout change could resurrect them).

The parsing mirrors the existing layout.split(":") pattern in hover_controls.vala, so no new warning class is introduced.

Testing

  • meson setup build --buildtype=release && ninja -C build — builds clean (errors: 0).
  • Installed locally with Classic Titlebar enabled: toggling Buttons Side between Left/Right now moves the controls live, and matches the floating hover-control behavior.
  • Verified default (:close) and SSD mode still behave correctly.

The classic (legacy static) titlebar only toggled the visibility of the
minimize/maximize/close controls and always kept them in the trailing
box. As a result the "Buttons Side" setting had no effect there: the
controls stayed pinned to the right even when set to Left.

Parse the button-layout into leading/trailing sides and reparent the
controls to the chosen edge, reusing the same cluster-side logic as
HoverControls so both titlebar modes agree. Also skip reflowing and
showing the controls in SSD mode, where the compositor draws the
window decorations.
@p134c0d3
p134c0d3 force-pushed the fix/classic-titlebar-buttons-side branch from 692be24 to 05416bf Compare July 19, 2026 03:55
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.

1 participant