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 705511 - Add support for HiDpi in the icon grid
Add support for HiDpi in the icon grid
Status: RESOLVED OBSOLETE
Product: gnome-weather
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
Depends on: 705465
Blocks:
 
 
Reported: 2013-08-05 12:59 UTC by Cosimo Cecchi
Modified: 2014-08-21 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: update libgd to master (536 bytes, patch)
2013-08-05 12:59 UTC, Cosimo Cecchi
reviewed Details | Review
world: adapt to libgd API changes (1.12 KB, patch)
2013-08-05 12:59 UTC, Cosimo Cecchi
reviewed Details | Review
window: create the model after the window (1.49 KB, patch)
2013-08-05 13:00 UTC, Cosimo Cecchi
needs-work Details | Review
world: use cairo surfaces in the icon grid (1.98 KB, patch)
2013-08-05 13:01 UTC, Cosimo Cecchi
needs-work Details | Review

Description Cosimo Cecchi 2013-08-05 12:59:22 UTC
See patches -- note that the libgd changes are already in master, and this depends on the gjs patches from bug 705465
Comment 1 Cosimo Cecchi 2013-08-05 12:59:26 UTC
Created attachment 250870 [details] [review]
build: update libgd to master
Comment 2 Cosimo Cecchi 2013-08-05 12:59:49 UTC
Created attachment 250871 [details] [review]
world: adapt to libgd API changes

It now has a column in the model for a pulse spinner on the icon.
Comment 3 Cosimo Cecchi 2013-08-05 13:00:31 UTC
Created attachment 250872 [details] [review]
window: create the model after the window

So that we can make sure to have an application window to read the
monitor scale from when the model is populated.
Comment 4 Cosimo Cecchi 2013-08-05 13:01:01 UTC
Created attachment 250873 [details] [review]
world: use cairo surfaces in the icon grid

This enables HiDpi support.
Comment 5 Giovanni Campagna 2013-08-07 09:29:49 UTC
Review of attachment 250871 [details] [review]:

::: src/world.js
@@ +27,3 @@
     MTIME: Gd.MainColumns.MTIME,
     SELECTED: Gd.MainColumns.SELECTED,
+    LOCATION: Gd.MainColumns.LAST,

Please add the new column to the enum, so that I don't forget what the GTypes mean in the constructor.
Comment 6 Giovanni Campagna 2013-08-07 09:31:54 UTC
Review of attachment 250870 [details] [review]:

I'd prefer to see one commit that bump libgd and updates for API changes, in case I need to git-bisect.
Comment 7 Giovanni Campagna 2013-08-07 09:34:20 UTC
Review of attachment 250872 [details] [review]:

This means that multiple windows (which are supported, although not really used) cannot share the model. Isn't there any way around this?

In the end, our icons are always symbolic themed icons, can't we use GIcon instead and let GtkCellRendererPixbuf deal with the scale complexity?
Comment 8 Giovanni Campagna 2013-08-07 09:35:34 UTC
Review of attachment 250873 [details] [review]:

::: src/util.js
@@ +103,3 @@
+    let app = Gio.Application.get_default();
+    let window = app.get_windows()[0];
+    let scale = window.get_scale_factor();

This gives you a wrong value if you have two windows on different screens.

::: src/world.js
@@ +17,3 @@
 // Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+const Cairo = imports.gi.cairo;

imports.cairo, not gi.cairo
Comment 9 Giovanni Campagna 2014-08-21 16:13:08 UTC
We don't have an icon grid anymore, closing.