summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@jolla.com>2026-04-03 12:36:59 +0200
committerAndrew Branson <andrew.branson@jolla.com>2026-04-03 12:36:59 +0200
commit5f999f7a4712c4a4d1c89054b544064cfd4b769e (patch)
treebc3cd7dec3e6ac358ebcc07dd8440aac3bd507dd
parentfd2fac203d3ffd8770c2ed60dedbd7b0777e0e32 (diff)
Icon fixesHEADmaster
- Detint icon on first signin - Symlink it to the old meegotouch theme dir if it exists.
-rw-r--r--rpm/sailfish-account-mastodon.spec26
-rw-r--r--settings/accounts/ui/mastodon.qml5
2 files changed, 29 insertions, 2 deletions
diff --git a/rpm/sailfish-account-mastodon.spec b/rpm/sailfish-account-mastodon.spec
index 97e790a..923ae8c 100644
--- a/rpm/sailfish-account-mastodon.spec
+++ b/rpm/sailfish-account-mastodon.spec
@@ -4,7 +4,7 @@
Name: sailfish-account-mastodon
License: BSD-3-Clause AND LGPL-2.1-or-later
-Version: 1.0.1
+Version: 1.0.2
Release: 1
Source0: %{name}-%{version}.tar.bz2
Summary: SailfishOS account plugin for Mastodon
@@ -63,9 +63,33 @@ Translation source files for sailfish-account-mastodon components.
%{_libexecdir}/manage-groups add account-mastodon || :
systemctl-user try-restart msyncd.service || :
+%posttrans
+# Pre-4.6 SailfishOS resolves theme icons from the legacy meegotouch tree.
+# If that theme exists, point it at the packaged silica icons.
+theme_dir=%{_datadir}/themes/sailfish-default
+legacy_dir="$theme_dir/meegotouch"
+if [ -d "$legacy_dir" ]; then
+ for icon in "$theme_dir"/silica/*/icons/icon-l-mastodon.png; do
+ [ -e "$icon" ] || continue
+ scale="$(basename "$(dirname "$(dirname "$icon")")")"
+ target_dir="$legacy_dir/$scale/icons"
+ [ -d "$target_dir" ] || continue
+ ln -sfn "../../../silica/${scale}/icons/icon-l-mastodon.png" \
+ "$target_dir/icon-l-mastodon.png"
+ done
+fi
+
%postun
/sbin/ldconfig
if [ "$1" -eq 0 ]; then
+ theme_dir=%{_datadir}/themes/sailfish-default
+ legacy_dir="$theme_dir/meegotouch"
+ if [ -d "$legacy_dir" ]; then
+ for icon in "$legacy_dir"/*/icons/icon-l-mastodon.png; do
+ [ -L "$icon" ] || continue
+ rm -f "$icon"
+ done
+ fi
%{_libexecdir}/manage-groups remove account-mastodon || :
fi
diff --git a/settings/accounts/ui/mastodon.qml b/settings/accounts/ui/mastodon.qml
index a4bd512..129fda5 100644
--- a/settings/accounts/ui/mastodon.qml
+++ b/settings/accounts/ui/mastodon.qml
@@ -255,11 +255,14 @@ AccountCreationAgent {
width: parent.width - x * 2
spacing: Theme.paddingMedium
- Icon {
+ Image {
id: promptIcon
width: Theme.iconSizeMedium
height: Theme.iconSizeMedium
source: "image://theme/icon-l-mastodon"
+ fillMode: Image.PreserveAspectFit
+ sourceSize.width: width
+ sourceSize.height: height
}
//: Prompt shown in account setup before OAuth sign-in.