From d6344ca12490e08b722f1da543eb8faf2223213d Mon Sep 17 00:00:00 2001
From: fossdd <fossdd@pwned.life>
Date: Sat, 28 Sep 2024 15:25:48 +0200
Subject: [PATCH] main/postmarketos-ui-phosh: use blue accent color by default
 (MR 5648)

See 20_postmarketos-blue-accent.gschema.override for reasoning.

Closes https://gitlab.com/postmarketOS/pmaports/-/issues/3218
---
 .../20_postmarketos-blue-accent.gschema.override     | 12 ++++++++++++
 main/postmarketos-ui-phosh/APKBUILD                  | 10 ++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 main/postmarketos-ui-phosh/20_postmarketos-blue-accent.gschema.override

diff --git a/main/postmarketos-ui-phosh/20_postmarketos-blue-accent.gschema.override b/main/postmarketos-ui-phosh/20_postmarketos-blue-accent.gschema.override
new file mode 100644
index 00000000000..df2501eca5c
--- /dev/null
+++ b/main/postmarketos-ui-phosh/20_postmarketos-blue-accent.gschema.override
@@ -0,0 +1,12 @@
+# With 87a596f7867a49fae78c05042a92bea3e5e24b0d all GNOME-based UIs have the
+# default accent color set to green.
+#
+# Phosh hasn't implemented accent colors and using green accent colors for apps
+# but not for the shell look inconsistent.
+#
+# Therefore set the blue accent color back until phosh has support for accent colors
+#
+# Ref: https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1533
+# Ref: https://gitlab.com/postmarketOS/pmaports/-/issues/3218
+[org.gnome.desktop.interface]
+accent-color='blue'
diff --git a/main/postmarketos-ui-phosh/APKBUILD b/main/postmarketos-ui-phosh/APKBUILD
index 539fe905a08..23acdb2693a 100644
--- a/main/postmarketos-ui-phosh/APKBUILD
+++ b/main/postmarketos-ui-phosh/APKBUILD
@@ -1,8 +1,8 @@
 # Reference: https://postmarketos.org/uipkg
 # Maintainer: Newbyte <newbyte@postmarketos.org>
 pkgname=postmarketos-ui-phosh
-pkgver=22.3
-pkgrel=11
+pkgver=22.4
+pkgrel=0
 pkgdesc="(Wayland) Mobile UI initially developed for the Librem 5"
 url="https://phosh.mobi"
 arch="noarch !armhf"
@@ -28,6 +28,7 @@ _pmb_groups="feedbackd"
 install="$pkgname.post-install $pkgname.post-upgrade"
 source="
 	01_postmarketos-ui-phosh.gschema.override
+	20_postmarketos-blue-accent.gschema.override
 	mimeapps.list
 	udiskie.desktop
 	"
@@ -41,6 +42,10 @@ package() {
 		"$pkgdir"/usr/share/applications/mimeapps.list
 	install -Dm644 "$srcdir"/udiskie.desktop \
 		"$pkgdir"/etc/xdg/autostart/udiskie.desktop
+
+	# TODO: Remove once Phosh supports accent colors
+	install -Dm644 "$srcdir"/20_postmarketos-blue-accent.gschema.override \
+		-t "$pkgdir"/usr/share/glib-2.0/schemas/
 }
 
 openrc() {
@@ -63,6 +68,7 @@ systemd() {
 
 sha512sums="
 e577b8073df680ccee75ef5b6bb1f2877d5727687d63d6fd9211298e791b6c9f593eb79278c77a4b4918e3c57333c2a012030baf5a3c8d6d16000cc63a030f84  01_postmarketos-ui-phosh.gschema.override
+b5269303032b35d6e249479eb8870063b862280eca9605522f47d09a3c2266861560934643cf4a39af2d309696bad16b086d8b98e1240bbaef5e6ba3048de1dd  20_postmarketos-blue-accent.gschema.override
 a741e8db9e4232334b924326c48be4e4c8f7a2382a7608926918a7491c518b2dda551e55a00d4d5fcf58c7950a78dc35d5cc5eaab53ad93a56de40887071f242  mimeapps.list
 53f5c565b4ca8a12f12b63ec84a0194ef530703565d123203d41582a35a54d66afaf3a676df158ae0effe327dcfc1c6496a082ce9dbe803b2547417c3c3fad6e  udiskie.desktop
 "
-- 
GitLab