From 7578a5926c8e06e99fc69c49e496a2ecfaf5a9b53229ef5bdccbcd8d66ec00aa Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sun, 18 Oct 2015 14:47:23 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/breeze?expand=0&rev=70 --- breeze.changes | 6 +++ breeze.spec | 5 +- set-breezyGTK-as-default-gtk-theme.patch | 58 ++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 set-breezyGTK-as-default-gtk-theme.patch diff --git a/breeze.changes b/breeze.changes index 8078467..c4bcd88 100644 --- a/breeze.changes +++ b/breeze.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Oct 18 14:50:37 UTC 2015 - hrvoje.senjan@gmail.com + +- Add set-breezyGTK-as-default-gtk-theme.patch and install gtkbreeze + kconf update script, so the GTK theme is correctly set + ------------------------------------------------------------------- Sat Oct 10 13:52:44 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/breeze.spec b/breeze.spec index b317700..0a2bf4b 100644 --- a/breeze.spec +++ b/breeze.spec @@ -54,6 +54,8 @@ Source99: %{name}-rpmlintrc Patch0: Use-NETRootInfo-to-initiate-wm-move-operation.patch # PATCH-FIX-UPSTREAM Install-emotes-and-mimtetypes-directories-of-the-dark-icon-theme.patch Patch1: Install-emotes-and-mimtetypes-directories-of-the-dark-icon-theme.patch +# PATCH-FIX-OPENSUSE set-breezyGTK-as-default-gtk-theme.patch +Patch2: set-breezyGTK-as-default-gtk-theme.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -114,6 +116,7 @@ This package provides Breeze KWin decoration. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %cmake_kf5 -d build -- -DBUILD_po=OFF -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5 @@ -125,8 +128,6 @@ This package provides Breeze KWin decoration. %icon_theme_cache_create_ghost breeze %icon_theme_cache_create_ghost breeze-dark - find %{buildroot} -type f -name '*gtkbreeze*' -exec rm -fv {} ';' - %post -n breeze5-icons %icon_theme_cache_post breeze %icon_theme_cache_post breeze-dark diff --git a/set-breezyGTK-as-default-gtk-theme.patch b/set-breezyGTK-as-default-gtk-theme.patch new file mode 100644 index 0000000..3688b85 --- /dev/null +++ b/set-breezyGTK-as-default-gtk-theme.patch @@ -0,0 +1,58 @@ +--- breeze-5.4.2/misc/gtkbreeze/main.cpp 2015-10-01 11:33:03.000000000 +0200 ++++ breeze-5.4.2.new/misc/gtkbreeze/main.cpp 2015-10-18 16:45:26.142502413 +0200 +@@ -74,7 +74,7 @@ QString isGtkThemeSetToOxygen(QString gt + */ + int setGtk2() + { +- const QString gtk2Theme = QStringLiteral("Orion"); // Orion looks kindae like breeze ++ const QString gtk2Theme = QStringLiteral("BreezyGTK"); // BreezyGTK looks kindae like breeze + const QString gtk2ThemeSettings = QStringLiteral("gtk-2.0/gtkrc"); // system installed file to check for + + const QString gtkThemeDirectory = isGtkThemeInstalled(gtk2Theme, gtk2ThemeSettings); +@@ -106,7 +106,7 @@ int setGtk2() + out << QStringLiteral("}\n"); + out << QStringLiteral("widget_class \"*\" style \"user-font\"\n"); + out << QStringLiteral("gtk-font-name=\"Oxygen-Sans Sans-Book 10\"\n"); // matches plasma-workspace:startkde/startkde.cmake +- out << QStringLiteral("gtk-theme-name=\"Orion\"\n"); ++ out << QStringLiteral("gtk-theme-name=\"BreezyGTK\"\n"); + out << QStringLiteral("gtk-icon-theme-name=\"breeze\"\n"); + out << QStringLiteral("gtk-fallback-icon-theme=\"gnome\"\n"); + out << QStringLiteral("gtk-toolbar-style=GTK_TOOLBAR_ICONS\n"); +@@ -123,8 +123,8 @@ int setGtk3() + { + qCDebug(GTKBREEZE) << "setGtk3()"; + +- const QString gtk3Theme = QStringLiteral("Orion"); // Orion looks kindae like breeze +- const QString gtk3ThemeSettings = QStringLiteral("gtk-3.0/settings.ini"); // check for installed /usr/share/themes/Orion/gtk-3.0/settings.ini ++ const QString gtk3Theme = QStringLiteral("BreezyGTK"); // BreezyGTK looks kindae like breeze ++ const QString gtk3ThemeSettings = QStringLiteral("gtk-3.0/settings.ini"); // check for installed /usr/share/themes/BreezyGTK/gtk-3.0/settings.ini + + const QString gtkThemeDirectory = isGtkThemeInstalled(gtk3Theme, gtk3ThemeSettings); + if (gtkThemeDirectory == 0) { +@@ -158,26 +158,6 @@ int setGtk3() + out << QStringLiteral("gtk-menu-images=1\n"); + out << QStringLiteral("gtk-button-images=1\n"); + qCDebug(GTKBREEZE) << "gtk3rc written"; +- +- QString cssFile = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first() + +- QDir::separator() + ".config/gtk-3.0/gtk.css"; +- QFile gtkcss3writer(cssFile); +- opened = gtkcss3writer.open(QIODevice::WriteOnly | QIODevice::Text); +- if (!opened) { +- qCWarning(GTKBREEZE) << "failed to open " << cssFile; +- return 1; +- } +- QTextStream outcss(>kcss3writer); +- outcss << QStringLiteral(".window-frame, .window-frame:backdrop {\n"); +- outcss << QStringLiteral(" box-shadow: 0 0 0 black;\n"); +- outcss << QStringLiteral(" border-style: none;\n"); +- outcss << QStringLiteral(" margin: 0;\n"); +- outcss << QStringLiteral(" border-radius: 0;\n"); +- outcss << QStringLiteral("}\n\n"); +- outcss << QStringLiteral(".titlebar {\n"); +- outcss << QStringLiteral(" border-radius: 0;\n"); +- outcss << QStringLiteral("}\n"); +- qCDebug(GTKBREEZE) << ".config/gtk-3.0/gtk.css written"; + return 0; + } +