void-packages/srcpkgs/qt5-styleplugins/patches/qt5.15.patch
Đoàn Trần Công Danh 635e9da391 srcpkgs/q*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
1.2 KiB
Diff

--- a/src/plugins/styles/gtk2/qgtkstyle_p.cpp 2017-03-11 10:23:02.000000000 +0100
+++ b/src/plugins/styles/gtk2/qgtkstyle_p.cpp 2017-03-11 10:23:02.000000000 +0100
@@ -508,7 +508,6 @@
if (oldTheme != QGtkStylePrivate::getThemeName()) {
oldTheme = QGtkStylePrivate::getThemeName();
QPalette newPalette = qApp->style()->standardPalette();
- QApplicationPrivate::setSystemPalette(newPalette);
QApplication::setPalette(newPalette);
if (!QGtkStylePrivate::instances.isEmpty()) {
QGtkStylePrivate::instances.last()->initGtkWidgets();
--- a/src/plugins/styles/gtk2/qgtkstyle.cpp 2020-06-13 19:48:41.746108796 +0200
+++ b/src/plugins/styles/gtk2/qgtkstyle.cpp 2020-06-13 19:48:41.746108796 +0200
@@ -440,7 +440,7 @@
// not supported as these should be entirely determined by
// current Gtk settings
if (app->desktopSettingsAware() && d->isThemeAvailable()) {
- QApplicationPrivate::setSystemPalette(standardPalette());
+ QApplication::setPalette(standardPalette());
QApplicationPrivate::setSystemFont(d->getThemeFont());
d->applyCustomPaletteHash();
if (!d->isKDE4Session())