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 745757 - Improve the favorites emblem
Improve the favorites emblem
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-03-06 17:34 UTC by Debarshi Ray
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
collection-view: Improve favorites emblem (4.29 KB, patch)
2015-06-23 08:19 UTC, Adrien Plazas
needs-work Details | Review
Screenshot of star over (almost) white thumbnails (57.87 KB, image/png)
2015-06-23 14:20 UTC, Zeeshan Ali
  Details
collection-view: Improve favorites emblem (4.23 KB, patch)
2015-06-25 06:58 UTC, Adrien Plazas
needs-work Details | Review
collection-view: Move favorites emblem (4.20 KB, patch)
2015-06-25 12:20 UTC, Adrien Plazas
accepted-commit_now Details | Review
collection-view: Change favorites emblem shape (1.09 KB, patch)
2015-06-25 12:20 UTC, Adrien Plazas
accepted-commit_now Details | Review
collection-view: Favorite emblem to bottom left (4.21 KB, patch)
2015-06-25 13:32 UTC, Adrien Plazas
committed Details | Review
collection-view: Favorites emblem now a star (1.08 KB, patch)
2015-06-25 13:32 UTC, Adrien Plazas
committed Details | Review

Description Debarshi Ray 2015-03-06 17:34:11 UTC
The favorites emblem is too big and uses a heart instead of a star.

Also, the current thinking is to move it to the left corner to avoid competing with the selection check box (see bug 733311).
Comment 1 Zeeshan Ali 2015-03-06 17:36:38 UTC
Sure, make sense. Its a UI change so can't push it into 3.16 anymore though.
Comment 2 Adrien Plazas 2015-06-23 08:19:29 UTC
Created attachment 305897 [details] [review]
collection-view: Improve favorites emblem

This moves the favorites emblem to the bottom left corner of the
thumbnails and draws it as a small star instead of a big heart.

This is needed to comply to GNOME's HIG and to make sure the favorites
emblem don't conflict with item selection checkbox.
Comment 3 Zeeshan Ali 2015-06-23 14:19:09 UTC
Review of attachment 305897 [details] [review]:

Results looks really good but wouldn't it be completely invisible on white box thumbnails? I'll attach screenshot to give you an idea.

::: src/collection-view.vala
@@ +40,3 @@
+    public static const Gdk.RGBA SMALL_EMBLEM_COLOR = { 1.0, 1.0, 1.0, 1.0 };
+    public static const int SMALL_EMBLEM_SIZE = 16;
+    public static const int SMALL_EMBLEM_PADDING = 8;

static is implied with const afaik.

@@ +100,3 @@
+            return pixbuf;
+
+        const Gtk.CornerType[] right_corner = { Gtk.CornerType.TOP_RIGHT, Gtk.CornerType.BOTTOM_RIGHT };

Please declare constants are class-wide above.

@@ +102,3 @@
+        const Gtk.CornerType[] right_corner = { Gtk.CornerType.TOP_RIGHT, Gtk.CornerType.BOTTOM_RIGHT };
+        double offset_x = corner_type in right_corner ? pixbuf.width - emblem.width - SMALL_EMBLEM_PADDING :
+                                                        SMALL_EMBLEM_PADDING;

why do these need to be double? They are passed as ints below.
Comment 4 Zeeshan Ali 2015-06-23 14:20:54 UTC
Created attachment 305920 [details]
Screenshot of star over (almost) white thumbnails

This screenshot isn't exactly perfectly showing the issue since thumbnails happen to not take all the height available to them but you get the idea.
Comment 5 Adrien Plazas 2015-06-25 06:58:12 UTC
Created attachment 306069 [details] [review]
collection-view: Improve favorites emblem

This moves the "favorites" emblem to the bottom left corner of the
thumbnails and draws it as a small star instead of a big heart.

This is needed to comply to GNOME's HIG and to make sure the "favorites"
emblem don't conflict with the item's selection checkbox.
Comment 6 Zeeshan Ali 2015-06-25 11:11:12 UTC
Review of attachment 306069 [details] [review]:

Two logical changes, aren't they? You know what i'm getting to.. :)
Comment 7 Adrien Plazas 2015-06-25 11:45:27 UTC
You mean using the starred icon and putting it on the bottom left side? Drawing the emblem where we want it and at the size we want it required to rewrite totally how emblems are handled, is it worthy to make a commit just to replace "favorite-emblem" by "starred-symbolic" when the code has been totally changed?
Comment 8 Zeeshan Ali 2015-06-25 12:06:40 UTC
(In reply to Adrien Plazas from comment #7)
> You mean using the starred icon and putting it on the bottom left side?

Yes.

> Drawing the emblem where we want it and at the size we want it required to
> rewrite totally how emblems are handled, is it worthy to make a commit just
> to replace "favorite-emblem" by "starred-symbolic" when the code has been
> totally changed?

I see what you mean but it won't be hard to first change the placing of the icon and then change how its drawn?
Comment 9 Adrien Plazas 2015-06-25 12:20:18 UTC
Created attachment 306098 [details] [review]
collection-view: Move favorites emblem

This moves the "favorites" emblem to the bottom left corner of the
thumbnails and draws it small.

This is needed to comply to GNOME's HIG and to make sure the "favorites"
emblem don't conflict with the item's selection checkbox.
Comment 10 Adrien Plazas 2015-06-25 12:20:22 UTC
Created attachment 306099 [details] [review]
collection-view: Change favorites emblem shape

This replaces the "emblem-favorite" icon by the "starred" icon as the
emblem for favorite boxes.

This is needed to comply to GNOME's HIG.
Comment 11 Zeeshan Ali 2015-06-25 12:32:06 UTC
Review of attachment 306099 [details] [review]:

Looks good.

* "collection-view: Favorite emblem now a star" would be more specific shortlog.
* Just for future ref, it'll save you some typing if you assume yourself to be the patch :) "This replaces.." -> "Replace..".
Comment 12 Zeeshan Ali 2015-06-25 12:34:44 UTC
Review of attachment 306098 [details] [review]:

Great but shortlog could be more specific: "Move favorite emblem to bottom left" or just "Favorite emblem to bottom left".
Comment 13 Adrien Plazas 2015-06-25 13:32:37 UTC
Created attachment 306104 [details] [review]
collection-view: Favorite emblem to bottom left

This moves the "favorites" emblem to the bottom left corner of the
thumbnails and draws it small.

This is needed to comply to GNOME's HIG and to make sure the "favorites"
emblem don't conflict with the item's selection checkbox.
Comment 14 Adrien Plazas 2015-06-25 13:32:42 UTC
Created attachment 306105 [details] [review]
collection-view: Favorites emblem now a star

Replace the "emblem-favorite" icon by the "starred" icon as the emblem
for favorite boxes.

This is needed to comply to GNOME's HIG.
Comment 15 Zeeshan Ali 2015-06-25 13:36:50 UTC
Attachment 306104 [details] pushed as 8fd7955 - collection-view: Favorite emblem to bottom left
Attachment 306105 [details] pushed as e8803fc - collection-view: Favorites emblem now a star