Skip to content

#133: Unified sidebar rendering via ScreenLayout - #537

Merged
JDonaghy merged 1 commit into
developfrom
issue-133-unified-sidebar-rendering-via-screenlayo
Jun 27, 2026
Merged

#133: Unified sidebar rendering via ScreenLayout#537
JDonaghy merged 1 commit into
developfrom
issue-133-unified-sidebar-rendering-via-screenlayo

Conversation

@JDonaghy

Copy link
Copy Markdown
Owner

Closes #133

Automated merge from the coordinator for assignment 93b01e5270bb on issue #133.

Worker branch: issue-133-unified-sidebar-rendering-via-screenlayodevelop.

…vity_bar

Both GTK and TUI had near-identical ~80-line functions that each built a
`quadraui::ActivityBar` primitive from engine state. This extracts the shared
logic into `render::build_activity_bar(engine, theme, include_hamburger,
active_ext_panel)` in render.rs — the same adapter pattern used by all other
sidebar primitives (sc_sidebar_panel, populate_explorer_tree_controller, etc.).

Both backends now delegate to this single function:
- GTK: `include_hamburger=false` (menu bar is a native GTK widget),
       passes `engine.ext_panel_active.as_deref()`
- TUI: `include_hamburger=true`  (no native menu bar; hamburger at index 0),
       passes `sidebar.ext_panel_name.as_deref()`

Icons now use `icon.s()` which respects `settings.use_nerd_fonts` — fixing a
latent bug where the GTK builder hardcoded `.nerd` regardless of that setting.
Minor cosmetic change: GTK search icon switches from SEARCH_COD (U+EA6D) to
SEARCH (U+F002); both are magnifying-glass glyphs, fallback "/" is unchanged.
Tooltips now consistently include keyboard shortcuts on both backends (GTK
already showed them; TUI ignores tooltips on activity bar items).

Also fixes a misplaced doc comment: `/// Map GDK key names…` was adjacent to
the removed function's doc block and is now properly placed above
`fn map_gtk_key_name`.

net: -80 lines of duplicated backend-specific builder code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JDonaghy
JDonaghy merged commit 0bd133f into develop Jun 27, 2026
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.

Unified sidebar rendering via ScreenLayout

1 participant