Repository navigation
Linux: native GTK sidebar and theme-aware header icons - #322
Merged
Merged
Conversation
- Replace theme-specific PNG header icons (Copilot, Doctor) with bundled GTK symbolic SVG icons that GTK recolors for the active theme, fixing the Doctor icon disappearing after light/dark switches. - Add a native GTK navigation-sidebar ListBox beside the BlazorWebView and hide the HTML sidebar on Linux; selection follows Blazor route changes. - Accept native navigation requests on Unix: Uri.TryCreate treated rooted routes such as /doctor as absolute file URIs and rejected them. - Retain header bar widgets to avoid GirCore toggle-ref GC crashes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Follow-up to #320 for the Linux (GTK) head.
Doctor icon fix
The Doctor and Copilot header buttons used theme-specific PNGs. The Doctor PNG was picked once from
IsDarkModewhen the window was created and was never refreshed, so depending on how the theme was switched it could end up dark-on-dark or light-on-light.Both buttons now use bundled GTK symbolic SVG icons (
Resources/icons/*-symbolic.svg), registered on the icon theme search path. GTK recolors them for the active theme, so they always match the header bar. The custom PNGs and the theme-change rebuild logic are removed.Native GTK sidebar
Gtk.ListBoxwith thenavigation-sidebarstyle, hosted as a MAUI view (LinuxNavigationSidebar+ handler) beside the BlazorWebView.NavigationView.Native navigation fix (all native buttons on Unix)
MainLayout.OnNavigationRequestedrejected routes usingUri.TryCreate(route, UriKind.Absolute, …). On Unix,/doctorparses as an absolutefile://URI, so native navigation requests were silently dropped on Linux. This included the existing Doctor header button. The guard now accepts only app-relative paths: a leading/, not//, and no\.Other
copilot-16(MIT). Attribution is inResources/icons/NOTICE.md.mauidevflow-logs/is now gitignored.Verification (Linux GTK, Screenshot Mode)
/secrets/publishselects only Publish).Known limitation: the sidebar width is fixed at 250px (not yet resizable or persisted like on Windows).