cui/source/options/appearance.cxx | 4 sd/uiconfig/simpress/ui/notebookbar.ui | 124 +++++++++++++++++++++------- solenv/sanitizers/ui/modules/simpress.suppr | 1 svtools/source/config/colorcfg.cxx | 76 ++++++++++++++++- 4 files changed, 171 insertions(+), 34 deletions(-)
New commits: commit f1a65f791a8ed745309b881cc367f7ae3a0b8985 Author: Heiko Tietze <[email protected]> AuthorDate: Fri Feb 13 14:09:44 2026 +0100 Commit: Heiko Tietze <[email protected]> CommitDate: Sat Feb 14 08:38:16 2026 +0100 Resolves tdf#170485 - Access to Theme Colors per Notebookbar in Impress "Design" tab added and new control placed there follow-up to 705dcfe362d4a6e99c1ef2b09a343cdbfe4f4674 Change-Id: I422e2086e38ca59425a57768a650fb80101cd5b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199346 Reviewed-by: Heiko Tietze <[email protected]> Tested-by: Jenkins diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui b/sd/uiconfig/simpress/ui/notebookbar.ui index caa424a2ffd4..7a2017aa4ef6 100644 --- a/sd/uiconfig/simpress/ui/notebookbar.ui +++ b/sd/uiconfig/simpress/ui/notebookbar.ui @@ -4,6 +4,16 @@ <requires lib="gtk+" version="3.24"/> <requires lib="LibreOffice" version="1.0"/> <!-- interface-local-resource-path ../../../icon-themes/colibre/cmd/ --> + <object class="GtkTreeStore" id="liststore1"> + <columns> + <!-- column-name expander --> + <column type="GdkPixbuf"/> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> <object class="GtkMenu" id="Menu Addons"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -6602,6 +6612,64 @@ <property name="tab_fill">False</property> </packing> </child> + <child> + <object class="sfxlo-PriorityHBox" id="Design_Tab"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <child> + <object class="sfxlo-PriorityMergedHBox" id="Design"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="valign">center</property> + <property name="vexpand">True</property> + <child> + <object class="sfxlo-NotebookbarToolBox" id="theme_colors_pane"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">5</property> + <child> + <object class="GtkToolButton" id="Theme-ThemeColorsPane"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="action-name">.uno:ThemeSelectorPanel</property> + <property name="use-underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="position">4</property> + </packing> + </child> + <child type="tab"> + <object class="GtkLabel" id="DesignLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="impressnotebookbar|DesignLabel">~Design</property> + <property name="use-underline">True</property> + </object> + <packing> + <property name="position">4</property> + <property name="tab-fill">False</property> + </packing> + </child> <child> <object class="sfxlo-PriorityHBox" id="Slide Show Tab"> <property name="visible">True</property> @@ -7135,7 +7203,7 @@ </child> </object> <packing> - <property name="position">4</property> + <property name="position">5</property> </packing> </child> <child type="tab"> @@ -7146,7 +7214,7 @@ <property name="use_underline">True</property> </object> <packing> - <property name="position">4</property> + <property name="position">5</property> <property name="tab_fill">False</property> </packing> </child> @@ -7754,7 +7822,7 @@ </child> </object> <packing> - <property name="position">5</property> + <property name="position">6</property> </packing> </child> <child type="tab"> @@ -7765,7 +7833,7 @@ <property name="use_underline">True</property> </object> <packing> - <property name="position">5</property> + <property name="position">6</property> <property name="tab_fill">False</property> </packing> </child> @@ -9112,7 +9180,7 @@ </child> </object> <packing> - <property name="position">6</property> + <property name="position">7</property> </packing> </child> <child type="tab"> @@ -9123,7 +9191,7 @@ <property name="use_underline">True</property> </object> <packing> - <property name="position">6</property> + <property name="position">7</property> <property name="tab_fill">False</property> </packing> </child> @@ -10090,7 +10158,7 @@ </child> </object> <packing> - <property name="position">7</property> + <property name="position">8</property> </packing> </child> <child type="tab"> @@ -10104,7 +10172,7 @@ </style> </object> <packing> - <property name="position">7</property> + <property name="position">8</property> <property name="tab_fill">False</property> </packing> </child> @@ -11394,7 +11462,7 @@ </child> </object> <packing> - <property name="position">8</property> + <property name="position">9</property> </packing> </child> <child type="tab"> @@ -11408,7 +11476,7 @@ </style> </object> <packing> - <property name="position">8</property> + <property name="position">9</property> <property name="tab_fill">False</property> </packing> </child> @@ -13203,7 +13271,7 @@ </child> </object> <packing> - <property name="position">9</property> + <property name="position">10</property> </packing> </child> <child type="tab"> @@ -13220,7 +13288,7 @@ </style> </object> <packing> - <property name="position">9</property> + <property name="position">10</property> <property name="tab_fill">False</property> </packing> </child> @@ -14144,7 +14212,7 @@ </child> </object> <packing> - <property name="position">10</property> + <property name="position">11</property> </packing> </child> <child type="tab"> @@ -14159,7 +14227,7 @@ </style> </object> <packing> - <property name="position">10</property> + <property name="position">11</property> <property name="tab_fill">False</property> </packing> </child> @@ -14714,7 +14782,7 @@ </child> </object> <packing> - <property name="position">11</property> + <property name="position">12</property> </packing> </child> <child type="tab"> @@ -14728,7 +14796,7 @@ </style> </object> <packing> - <property name="position">11</property> + <property name="position">12</property> <property name="tab_fill">False</property> </packing> </child> @@ -15606,7 +15674,7 @@ </child> </object> <packing> - <property name="position">12</property> + <property name="position">13</property> </packing> </child> <child type="tab"> @@ -15620,7 +15688,7 @@ </style> </object> <packing> - <property name="position">12</property> + <property name="position">13</property> <property name="tab_fill">False</property> </packing> </child> @@ -16485,7 +16553,7 @@ </child> </object> <packing> - <property name="position">13</property> + <property name="position">14</property> </packing> </child> <child type="tab"> @@ -16499,7 +16567,7 @@ </style> </object> <packing> - <property name="position">13</property> + <property name="position">14</property> <property name="tab_fill">False</property> </packing> </child> @@ -17379,7 +17447,7 @@ </child> </object> <packing> - <property name="position">14</property> + <property name="position">15</property> </packing> </child> <child type="tab"> @@ -17393,7 +17461,7 @@ </style> </object> <packing> - <property name="position">14</property> + <property name="position">15</property> <property name="tab_fill">False</property> </packing> </child> @@ -18273,7 +18341,7 @@ </child> </object> <packing> - <property name="position">15</property> + <property name="position">16</property> </packing> </child> <child type="tab"> @@ -18287,7 +18355,7 @@ </style> </object> <packing> - <property name="position">15</property> + <property name="position">16</property> <property name="tab_fill">False</property> </packing> </child> @@ -18404,7 +18472,7 @@ </child> </object> <packing> - <property name="position">16</property> + <property name="position">17</property> </packing> </child> <child type="tab"> @@ -18415,7 +18483,7 @@ <property name="use_underline">True</property> </object> <packing> - <property name="position">16</property> + <property name="position">17</property> <property name="tab_fill">False</property> </packing> </child> @@ -19451,7 +19519,7 @@ </child> </object> <packing> - <property name="position">16</property> + <property name="position">18</property> </packing> </child> <child type="tab"> @@ -19462,7 +19530,7 @@ <property name="use_underline">True</property> </object> <packing> - <property name="position">16</property> + <property name="position">18</property> <property name="tab_fill">False</property> </packing> </child> diff --git a/solenv/sanitizers/ui/modules/simpress.suppr b/solenv/sanitizers/ui/modules/simpress.suppr index 4b14930cf99d..4c09ce5530d3 100644 --- a/solenv/sanitizers/ui/modules/simpress.suppr +++ b/solenv/sanitizers/ui/modules/simpress.suppr @@ -30,4 +30,5 @@ sd/uiconfig/simpress/ui/notebookbar_online.ui://GtkToolButton[@id='Home-FontHeig sd/uiconfig/simpress/ui/notebookbar_online.ui://GtkToolButton[@id='MasterSlide-MasterSlidePane'] button-no-label sd/uiconfig/simpress/ui/notebookbar_online.ui://GtkToolButton[@id='Transitions-SlideTransitionsPane'] button-no-label sd/uiconfig/simpress/ui/notebookbar_online.ui://GtkToolButton[@id='Theme-ThemeColorsPane'] button-no-label +sd/uiconfig/simpress/ui/notebookbar.ui://GtkToolButton[@id='Theme-ThemeColorsPane'] button-no-label commit ddc1dbf729195006b97a7581f42dd4c813228b6d Author: Heiko Tietze <[email protected]> AuthorDate: Wed Jan 14 16:24:33 2026 +0100 Commit: Heiko Tietze <[email protected]> CommitDate: Sat Feb 14 08:38:01 2026 +0100 Resolves tdf#170678 - Immediately update colors on theme/color change Change-Id: I98473aeb0e6a7dcc479cabe6cccb2b8cf9ec1867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197282 Tested-by: Jenkins Reviewed-by: Heiko Tietze <[email protected]> diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index e8a5eb35ecea..640225ac6ed6 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -351,10 +351,6 @@ IMPL_LINK_NOARG(SvxAppearanceTabPage, ColorValueChgHdl, ColorListBox&, void) ColorConfigValue aCurrentEntryColor = pColorConfig->GetColorValue(nEntry); - // restart only for the UI colors - if (nEntry >= WINDOWCOLOR) - m_bRestartRequired = true; - // use nColor for caching the value of color in use. This avoids tedious refactoring which IMO // would use function calls to discriminate between colors. Those functions themself call some virtual functions // making the whole thing super slow (comparatively). diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 454624d52540..c818c6f9bc53 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -37,7 +37,6 @@ #include <vcl/window.hxx> #include "itemholder2.hxx" -#include <tools/color.hxx> #include <vcl/svapp.hxx> #include <vcl/event.hxx> @@ -105,7 +104,7 @@ public: // get the configured value - if bSmart is set the default color setting is provided // instead of the automatic color ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart = true) const; - + void UpdateSettings(); DECL_LINK( DataChangedEventListener, VclSimpleEvent&, void ); }; @@ -706,6 +705,76 @@ const OUString& ColorConfig_Impl::GetCurrentSchemeName() return GetLoadedScheme(); } +void ColorConfig_Impl::UpdateSettings() +{ + AllSettings aAllSettings(Application::GetSettings()); + StyleSettings aStyleSettings(aAllSettings.GetStyleSettings()); + + Color aColor = GetColorValue(WINDOWCOLOR, true).nColor; + aStyleSettings.SetWindowColor(aColor); + aStyleSettings.BatchSetBackgrounds(aColor); + aStyleSettings.SetActiveTabColor(aColor); + aStyleSettings.SetHelpColor(aColor); + + aColor = GetColorValue(BASECOLOR, true).nColor; + aStyleSettings.SetInactiveTabColor(aColor); + aStyleSettings.SetListBoxWindowBackgroundColor(aColor); + aStyleSettings.SetFieldColor(aColor); + + aStyleSettings.SetDisableColor(GetColorValue(DISABLEDCOLOR, true).nColor); + + aColor = GetColorValue(ACCENTCOLOR, true).nColor; + aStyleSettings.SetAccentColor(aColor); + aStyleSettings.SetHighlightColor(aColor); + aStyleSettings.SetListBoxWindowHighlightColor(aColor); + // aStyleSettings.SetLinkColor(aColor); + + aColor = GetColorValue(WINDOWTEXTCOLOR, true).nColor; + aStyleSettings.SetListBoxWindowTextColor(aColor); + aStyleSettings.SetWindowTextColor(aColor); + aStyleSettings.SetRadioCheckTextColor(aColor); + aStyleSettings.SetLabelTextColor(aColor); + aStyleSettings.SetFieldTextColor(aColor); + aStyleSettings.SetTabTextColor(aColor); + aStyleSettings.SetHelpTextColor(aColor); + aStyleSettings.SetActiveTextColor(aColor); + + aColor = GetColorValue(MENUBARHIGHLIGHTCOLOR, true).nColor; + aStyleSettings.SetListBoxWindowHighlightTextColor(aColor); + aColor = GetColorValue(MENUBARTEXTCOLOR, true).nColor; + aStyleSettings.SetMenuBarTextColor(aColor); + aColor = GetColorValue(MENUTEXTCOLOR, true).nColor; + aStyleSettings.SetMenuTextColor(aColor); + + aColor = GetColorValue(BUTTONTEXTCOLOR, true).nColor; + aStyleSettings.SetButtonTextColor(aColor); + aStyleSettings.SetDefaultActionButtonTextColor(aColor); + aStyleSettings.SetActionButtonTextColor(aColor); + aStyleSettings.SetDefaultButtonTextColor(aColor); + aStyleSettings.SetDefaultButtonRolloverTextColor(aColor); + aStyleSettings.SetDefaultButtonPressedRolloverTextColor(aColor); + aStyleSettings.SetFlatButtonTextColor(aColor); + aStyleSettings.SetFlatButtonPressedRolloverTextColor(aColor); + aStyleSettings.SetFlatButtonRolloverTextColor(aColor); + aStyleSettings.SetButtonRolloverTextColor(aColor); + aStyleSettings.SetDefaultActionButtonRolloverTextColor(aColor); + aStyleSettings.SetDefaultActionButtonPressedRolloverTextColor(aColor); + aStyleSettings.SetActionButtonRolloverTextColor(aColor); + aStyleSettings.SetActionButtonPressedRolloverTextColor(aColor); + aStyleSettings.SetFieldRolloverTextColor(aColor); + aStyleSettings.SetButtonRolloverTextColor(aColor); + aStyleSettings.SetButtonPressedRolloverTextColor(aColor); + + aColor = GetColorValue(SHADECOLOR, true).nColor; + aStyleSettings.SetShadowColor(aColor); + + aColor = GetColorValue(MENUBARHIGHLIGHTTEXTCOLOR, true).nColor; + aStyleSettings.SetTabRolloverTextColor(aColor); + + aAllSettings.SetStyleSettings(aStyleSettings); + Application::SetSettings(aAllSettings); +} + EditableColorConfig::EditableColorConfig() : m_pImpl(new ColorConfig_Impl), m_bModified(false) @@ -790,7 +859,10 @@ void EditableColorConfig::Commit() if(m_bModified) m_pImpl->SetModified(); if(m_pImpl->IsModified()) + { m_pImpl->Commit(); + m_pImpl->UpdateSettings(); + } m_bModified = false; }
