Repository navigation
The Viewer's disabled server list keeps its theme instead of turning white (#4683) - #4685
Merged
erikdarlingdata merged 3 commits intoSep 29, 2026
Merged
Conversation
…d of stock white (#4683) The stock ListBox template's disabled trigger paints its inner border white by TargetName, so the sidebar server list (disabled while the store is unavailable, #4648) rendered as a solid white box in every theme. Each Viewer theme now has an implicit ListBox style carrying a copy of the stock template whose disabled trigger only dims (Opacity 0.5, the theme's own disabled dimming). Render checks per theme cover the disabled list, the shipped ServerList, and an enabled list matching the stock template pixel for pixel.
…spell ListBox in C# (#4683) The bound listed ListBox as a cref target no C# spelled. ViewerDisabledListBoxThemeTests now does, so the three doc-comment sites resolve, and the census compares the bounded set for equality, so the entry goes.
erikdarlingdata
marked this pull request as ready for review
September 29, 2026 00:21
erikdarlingdata
deleted the
feature/4683-viewer-serverlist-disabled-theme
branch
September 29, 2026 00:24
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 #4683.
Why
While the store is unavailable,
ApplyStoreUnavailableShelldisables the store-dependent sidebar entries, includingServerList(#4649 for #4648). The stock (Aero2) ListBox template'sIsEnabled=Falsetrigger sets its inner borderBdto#FFFFFF(Background) and#D9D9D9(BorderBrush) by TargetName, which beats the list's ownBackground="{DynamicResource BackgroundDarkBrush}". So the disabled list was a solid white box in Dark, Light and Cool Breeze. A style-levelIsEnabledtrigger can't fix that, so the fix has to carry the template.What changes
Themes/DarkTheme.xaml,LightTheme.xaml,CoolBreezeTheme.xaml(Viewer): a new implicitListBoxstyle (no key, placed afterComboBoxItem, beforeTabControl). It sets onlyTemplate: a copy of the upstream Aero2 template (BorderBdwith the three TemplateBindings, Padding 1, SnapsToDevicePixels, ScrollViewerFocusable=Falsewith Padding bound, ItemsPresenter, and theIsGrouping/IsVirtualizingWhenGroupingMultiTrigger). The only difference is the disabled trigger: it no longer touches Background or BorderBrush and only setsOpacity0.5. The stock theme style still supplies every other ListBox default.ServerList.IsEnabled = falseis unchanged (a screen reader still reports it unavailable; no IsHitTestVisible).MainWindow.xamlandMainWindow.xaml.csare untouched.Darling.Tests/ViewerDisabledListBoxThemeTests.cs(STA, renders withRenderTargetBitmap).DocCommentHygieneTests: removed theListBoxentry fromUnresolvedCrefTargets. It was bounded because no C# spelledListBox; the new test does, so the census (compared for equality) required deleting it.Test plan
#FFFFFFin all three themes: Dark expected#1A1C21, Light expected#F8F8FA, Cool Breeze expected#DEE8F2(each the theme'sBackgroundDarkBrushat 0.5 over the window background). Light'sBackgroundDarkBrushis#F0F2F5, not white, so Light does go RED (5 to 8 levels per channel against a tolerance of 2).ViewerDisabledListBoxThemeTests9 of 9 (generic disabled ListBox x3 themes, the realServerListelement parsed fromMainWindow.xamlx3, enabled list pixel-identical to the stock template x3).Padding="1"to"0"fails it (3210 bytes differ); restored. It also asserts the disabled renders differ, so a style that never reaches the list can't pass.Vieweror containingStoreUnavailable: 2007 total, 0 failed, 127 skipped.ThemeCompletenessTests(Darling),Viewer4629Tests,ViewerStoreUnavailableShellTests: pass (45 with the new class). Lite.TestsThemeParityLiteDarlingTestsandThemeCompletenessTests: 5 of 5.Other ListBoxes and Lite
The Viewer has six:
ServerList(MainWindow),ServerCheckList(ManageTagsWindow), andDatabaseFilterList,WaitTypesList,MemoryClerksList,PerfmonCountersList(ViewerServerTab). None sets its ownStyleorTemplate, so all pick up the new style; enabled they render as before. No.cssetsIsEnabledon the last five, and no XAML binding,ElementNameor style trigger reaches them (everyIsEnabledinViewerServerTab.xamlis on a menu item or button). One more disabled path found:ManageTagsWindowsetsroot.IsEnabled = falseon the whole content on a read-only seat (ManageTagsWindow.xaml.cs:120), soServerCheckListinherited disabled and showed the same white box; it now dims with its ownBackgroundBrush. Not screenshot-verified.PerformanceMonitor.Uihas no ListBox. Lite has the same six (ServerListView,ServerCheckList, and four inServerTab.xaml). No code or binding disables any of them (the onlyIsEnabledwrites in itsMainWindowfiles are on context-menu items and the import button), and Lite's theme files are unchanged, so Lite needs no change.Decisions to double check
DarkButton, which swapsViewerDisabledBgBrush/ViewerDisabledTextBrushand has no opacity to match. The theme's own disabled controls (implicit Button, AccentButton, SuccessButton, PasswordBox) all use 0.5. One number per theme file, plusDisabledOpacityin the test.ServerListcarries the themedBorderBrush); the stock#D9D9D9is gone. A list that sets no BorderBrush keeps the stock#ABADB3in both states.CHANGELOG
SECTION: Fixed
ENTRY:
REF:
[The Viewer's disabled server list keeps its theme instead of turning white (#4683) #4685]: The Viewer's disabled server list keeps its theme instead of turning white (#4683) #4685