After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781029 - sunset and sunrise assets fuzzy on HiDPI
sunset and sunrise assets fuzzy on HiDPI
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Display
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-07 11:19 UTC by Jakub Steiner
Modified: 2017-04-10 09:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fuzzy icons (42.85 KB, image/png)
2017-04-07 11:19 UTC, Jakub Steiner
  Details
Load appropriate assets for the night light panel (7.63 KB, patch)
2017-04-07 11:55 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
Load appropriate assets for the night light panel (7.72 KB, patch)
2017-04-07 12:02 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
Using Adwaita assets (41.72 KB, image/png)
2017-04-07 13:54 UTC, Emmanuele Bassi (:ebassi)
  Details

Description Jakub Steiner 2017-04-07 11:19:34 UTC
Created attachment 349458 [details]
fuzzy icons

The icons for sunset and sunrise do exists in the symbolic theme as daytime-sunrise-symbolic and daytime-sunset-symbolic, however the display panel ships them as png resources. They get fuzzy on HiDPI as the attched screenshot demonstrates.
Comment 1 Emmanuele Bassi (:ebassi) 2017-04-07 11:55:44 UTC
Created attachment 349464 [details] [review]
Load appropriate assets for the night light panel

We hard-code a 16x16 asset for sunrise and sunset icons, which makes
them look blurry at higher scaling factors.

Let's look in the icon theme to see if there's an icon for sunrise and
sunset; if not, we can still use the assets we ship, but we also attempt
to load them from different resource paths, depending on the scale
factor.

We will need to update the assets to include a 32x32 rendering of the
sunrise and sunset icons.
Comment 2 Emmanuele Bassi (:ebassi) 2017-04-07 12:02:43 UTC
Created attachment 349465 [details] [review]
Load appropriate assets for the night light panel

We hard-code a 16x16 asset for sunrise and sunset icons, which makes
them look blurry at higher scaling factors.

Let's look in the icon theme to see if there's an icon for sunrise and
sunset; if not, we can still use the assets we ship, but we also attempt
to load them from different resource paths, depending on the scale
factor.

We will need to update the assets to include a 32x32 rendering of the
sunrise and sunset icons.
Comment 3 Rui Matos 2017-04-07 13:32:42 UTC
Review of attachment 349465 [details] [review]:

Code looks good. Please prefix the commit subject with the panel name, in this case display:

Not sure if this is a UI break and thus may go to the 3.24 branch
Comment 4 Emmanuele Bassi (:ebassi) 2017-04-07 13:54:40 UTC
Created attachment 349483 [details]
Using Adwaita assets
Comment 5 Emmanuele Bassi (:ebassi) 2017-04-07 13:56:34 UTC
Pushed to master, after updating the commit message.
Comment 6 Emmanuele Bassi (:ebassi) 2017-04-09 15:31:33 UTC
(In reply to Rui Matos from comment #3)

> Not sure if this is a UI break and thus may go to the 3.24 branch

I don't think it's a UI break: the icon is part of Adwaita for that specific reason, and the fallback asset in place in case the theme does not have the icon is the same. At most, you'll experience the same bug if:

 - you don't use Adwaita
 - your icon theme does not provide daytime-sunset/daytime-sunrise symbolic icons
 - you are using HiDPI resolutions

Ideally, we should ship a new 32x32 fallback asset, but that can be introduced in master and we can discuss the backport to the gnome-3-24 branch.
Comment 7 Emmanuele Bassi (:ebassi) 2017-04-09 15:32:45 UTC
I'll poke the release team by Monday, so we can decide to backport by the time we need a g-c-c release for 3.24.1.
Comment 8 Matthias Clasen 2017-04-10 09:48:34 UTC
With my release team hat on, I don't think this is a ui break, and I have no objections to putting this into 3.24.1
Comment 9 Emmanuele Bassi (:ebassi) 2017-04-10 09:58:45 UTC
Thanks. I've cherry-picked the fix to gnome-3-24.