GNOME Bugzilla – Bug 751683
Add support for hidpi displays in the overview
Last modified: 2015-07-01 20:09:27 UTC
See attached patchset.
Created attachment 306335 [details] [review] bijiben: don't call gtk_init() GtkApplication does this for us.
Created attachment 306336 [details] [review] bijiben: add own CSS style for notebooks Since Adwaita moved to GTK+, it doesn't hold CSS for applications. Well-behaved applications will only load the Adwaita CSS when the theme is set to Adwaita; this code was originally written by Matthias Clasen and is imported from Nautilus.
Created attachment 306337 [details] [review] Update libgd In preparation for next commit.
Created attachment 306338 [details] [review] Use cairo surfaces for drawing Instead of pixbufs. This enables crisp rendering of overview thumbnails on hidpi displays.
Created attachment 306339 [details] [review] notebook: don't fetch list of surfaces twice
Created attachment 306340 [details] [review] note-obj: move frame rendering to CSS
Created attachment 306341 [details] [review] empty-results-box: fix blurry icon in hi-dpi Just put the icon in our GResource instead of loading it from disk. Also don't use the pixbuf loader directly, or we won't get scaling factor and CSS styling.
Created attachment 306342 [details] [review] search-provider: don't return invalid results Both ID and name have to be non-NULL. Ensure they are.
Created attachment 306348 [details] [review] bijiben: don't call gtk_init() GtkApplication does this for us.
Created attachment 306349 [details] [review] bijiben: add own CSS style for notebooks Since Adwaita moved to GTK+, it doesn't hold CSS for applications. Well-behaved applications will only load the Adwaita CSS when the theme is set to Adwaita; this code was originally written by Matthias Clasen and is imported from Nautilus.
Created attachment 306350 [details] [review] Update libgd In preparation for next commit.
Created attachment 306351 [details] [review] Use cairo surfaces for drawing Instead of pixbufs. This enables crisp rendering of overview thumbnails on hidpi displays. This commit also removes the abilty to load and save icons to disk, since we don't want to cache them while their appearance changes e.g. due to the theme. The only consequence for now is that we won't get full icons in the search provider, but that will be fixed in a later commit.
Created attachment 306352 [details] [review] notebook: don't fetch list of surfaces twice
Created attachment 306353 [details] [review] empty-results-box: fix blurry icon in hi-dpi Just put the icon in our GResource instead of loading it from disk. Also don't use the pixbuf loader directly, or we won't get scaling factor and CSS styling.
Created attachment 306354 [details] [review] search-provider: don't return invalid results Both ID and name have to be non-NULL. Ensure they are.
Created attachment 306355 [details] [review] manager: rework how the manager is constructed We want to use the manager from the shell search provider, to be able to load note thumbnails now that we don't save them to disk anymore. Split it in sync and async constructors using GInitable, and have the main application still use the async constructor. The search provider wants all the information loaded upfront so it will use the synchronous constructor. Along the way, code was ported to use g_icon_serialize() and many leaks were fixed.
Attached a better patchset that also takes care of the search provider icons.
(In reply to Cosimo Cecchi from comment #11) > Created attachment 306350 [details] [review] [review] > Update libgd > > In preparation for next commit. Into libgd, i'm seeing the new method in icon-utils.c, but is the header not updated? https://git.gnome.org/browse/libgd/commit/?id=1e049c22660d70132a3735d61d7a7daa957b59fc
(In reply to Cosimo Cecchi from comment #6) > Created attachment 306340 [details] [review] [review] > note-obj: move frame rendering to CSS is this one still alive? (because next comment is an obsolete one) if so, it does add + gtk_style_context_add_class (style, "note-emblem"); but 'style' arg is not defined, or I did miss one patch
*** Bug 742365 has been marked as a duplicate of this bug. ***
(In reply to Pierre-Yves Luyten from comment #18) > Into libgd, i'm seeing the new method in icon-utils.c, but is the header not > updated? Yes sorry, just fixed this. I will update the "Update libgd" patch to include this new commit when pushing this patchset. (In reply to Pierre-Yves Luyten from comment #19) > is this one still alive? (because next comment is an obsolete one) > if so, it does add > > + gtk_style_context_add_class (style, "note-emblem"); > > but 'style' arg is not defined, or I did miss one patch Yeah my bad again. It was indeed obsoleted with the second patchset I attached.
(In reply to Cosimo Cecchi from comment #21) > (In reply to Pierre-Yves Luyten from comment #18) > > Into libgd, i'm seeing the new method in icon-utils.c, but is the header not > > updated? > > Yes sorry, just fixed this. I will update the "Update libgd" patch to > include this new commit when pushing this patchset. > Since you fixed libgd, I can update bijiben to latest. Actually first tests yesterday without the recently updated commit went fine. I'm only testing using GDK_SCALE but I shall push this tonight.
this is now pushed, thanks also for the additional improvements you did work on. (I'm not sure I can test shell provider icons using GDK_SCALE but anyway this is using the same function now, which is quite a great fix!)