#133: Unified sidebar rendering via ScreenLayout - #537
Merged
JDonaghy merged 1 commit intoJun 27, 2026
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #133
Automated merge from the coordinator for assignment 93b01e5270bb on issue #133.
Worker branch:
issue-133-unified-sidebar-rendering-via-screenlayo→develop.