MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / TaskbarSettingsChanged

Method TaskbarSettingsChanged

TranslucentTB/mainappwindow.cpp:108–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void MainAppWindow::TaskbarSettingsChanged(const txmp::TaskbarState &state, const txmp::TaskbarAppearance &appearance)
109{
110 auto &config = GetConfigForState(state);
111
112 // restore color because the context menu doesn't transmit that info
113 appearance.Color(config.Color);
114
115 if (const auto optAppearance = appearance.try_as<txmp::OptionalTaskbarAppearance>())
116 {
117 if (state == txmp::TaskbarState::Desktop) [[unlikely]]
118 {
119 throw std::invalid_argument("Desktop appearance is not optional");
120 }
121
122 static_cast<OptionalTaskbarAppearance &>(config) = optAppearance;
123 }
124 else
125 {
126 config = appearance;
127 }
128
129 m_App.GetWorker().ConfigurationChanged();
130}
131
132void MainAppWindow::ColorRequested(const txmp::TaskbarState &state)
133{

Callers 1

RegisterMenuHandlersMethod · 0.80

Calls 2

ColorMethod · 0.80
ConfigurationChangedMethod · 0.45

Tested by

no test coverage detected