feat(themes): restore the header theme/tab quick-picker
Brings back the 1.5.4 quick-picker lost in the v1.6.0 rewrite: a palette button in the input-bar button row (left of the cog) opens a popup that switches the theme (built-in + custom, active row checked) and jumps between chat tabs without opening settings. Theme switch mirrors the settings ThemePicker; the tab jump routes through a new MainWindow.ActivateTab that replays the click path (previous -> set -> OnTabActivated) so tell/unread handling is unchanged. Main window only -- pop-out InputBars get a null picker. Adds QuickPickerSelfTestStep.
This commit is contained in:
@@ -135,6 +135,19 @@ internal sealed class MainWindow : Window
|
||||
TabLifecycleHelpers.OnTabActivated(next, removed);
|
||||
}
|
||||
|
||||
// Programmatic tab activation for the header quick-picker. Mirrors the click
|
||||
// path in TopTabBar/Sidebar exactly (previous → set → OnTabActivated) so a
|
||||
// header pick strips tell-state and resets unread the way a real click does.
|
||||
internal void ActivateTab(Tab tab)
|
||||
{
|
||||
if (ReferenceEquals(_activeTab, tab))
|
||||
return;
|
||||
|
||||
var previous = _activeTab;
|
||||
_activeTab = tab;
|
||||
TabLifecycleHelpers.OnTabActivated(tab, previous);
|
||||
}
|
||||
|
||||
// Internal accessors for self-tests so the probes can reach the live
|
||||
// component without exposing them as public surface.
|
||||
internal Components.Sidebar GetSidebarForSelfTest() => _sidebar;
|
||||
|
||||
Reference in New Issue
Block a user