summaryrefslogtreecommitdiff
path: root/vcl/qt5/QtFrame.cxx
diff options
context:
space:
mode:
authorSahil Gautam <sahil@libreoffice.org>2024-11-05 15:25:24 +0530
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2024-11-06 20:50:32 +0100
commitc85155cf6d43e328bfe31834a49fbfb55670e166 (patch)
treec51952e0382af8ff38418f32602223dad0509dfa /vcl/qt5/QtFrame.cxx
parent4bdb421440207c21bf2ea93fdf8a9494742beb08 (diff)
tdf#158943 Libreoffice Theme Part 3: Qt Color Customization
Enable UI color customization in QT via the use of custom palettes and custom style objects for the application, and the native widgets like the menus and the menubar. Menubar in `kf6` doesn't follow the set palette's colors anymore, maybe some update from kde/qt (something to look into). Works fine for `kf5`. ticket: https://bugs.kde.org/show_bug.cgi?id=493550 Change-Id: Ibedd6d66b8ea2855e049a85b3d51ea7e933b5c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168901 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
Diffstat (limited to 'vcl/qt5/QtFrame.cxx')
-rw-r--r--vcl/qt5/QtFrame.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 61903543bc9e..c8f0960bc6a3 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <IconThemeSelector.hxx>
+#include <QtCustomStyle.hxx>
#include <QtFrame.hxx>
#include <QtFrame.moc>
@@ -29,7 +31,6 @@
#include <QtMenu.hxx>
#include <QtSvpGraphics.hxx>
#include <QtSystem.hxx>
-#include <QtTools.hxx>
#include <QtTransferable.hxx>
#if CHECK_ANY_QT_USING_X11
#include <QtX11Support.hxx>
@@ -1026,11 +1027,6 @@ void QtFrame::setInputLanguage(LanguageType nInputLanguage)
CallCallback(SalEvent::InputLanguageChange, nullptr);
}
-static Color toColor(const QColor& rColor)
-{
- return Color(rColor.red(), rColor.green(), rColor.blue());
-}
-
static bool toVclFont(const QFont& rQFont, const css::lang::Locale& rLocale, vcl::Font& rVclFont)
{
FontAttributes aFA;
@@ -1068,6 +1064,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
{
if (QtData::noNativeControls())
return;
+ QtCustomStyle::LoadCustomStyle(GetUseDarkMode());
StyleSettings style(rSettings.GetStyleSettings());
const css::lang::Locale aLocale = rSettings.GetUILanguageTag().getLocale();