summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2021-06-29 10:13:56 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2021-06-29 10:13:56 +0200
commit00c679796648b38c869af3e190f8fa98513368cf (patch)
treeb1071d5e23acb52fee122512eb5df24a72432c98
parent8b23c3156800255b6c0468b4d5a8e6b53a11c837 (diff)
parenta955af3ef1376a1908b97a9b189b717cca6e669d (diff)
downloadnetwork-manager-applet-00c679796648b38c869af3e190f8fa98513368cf.tar.gz
Merge branch 'FreaxMATE/network-manager-applet-blury_fix'
https://gitlab.gnome.org/GNOME/network-manager-applet/-/merge_requests/97
-rw-r--r--src/applet.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/applet.c b/src/applet.c
index 8cf6dc43..1b309aa8 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3173,8 +3173,18 @@ status_icon_size_changed_cb (GtkStatusIcon *icon,
/* icon_size may be 0 if for example the panel hasn't given us any space
* yet. We'll get resized later, but for now just load the 16x16 icons.
*/
- if (size > 0)
- applet->icon_size = size;
+ if (size > 0) {
+ if (size < 22)
+ applet->icon_size = 16;
+ else if (size < 24)
+ applet->icon_size = 22;
+ else if (size < 32)
+ applet->icon_size = 24;
+ else if (size < 48)
+ applet->icon_size = 32;
+ else
+ applet->icon_size = size;
+ }
else {
applet->icon_size = 16;
g_warn_if_fail (size == 0);