Merge lp:~tristang4/pantheon-photos/update-icons into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Tristan Petersen
Status: Merged
Approved by: Danielle Foré
Approved revision: 2508
Merged at revision: 2509
Proposed branch: lp:~tristang4/pantheon-photos/update-icons
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 73 lines (+7/-11)
3 files modified
src/MediaPage.vala (+2/-4)
src/PhotoPage.vala (+2/-4)
src/Resources.vala (+3/-3)
To merge this branch: bzr merge lp:~tristang4/pantheon-photos/update-icons
Reviewer Review Type Date Requested Status
Danielle Foré Approve
Review via email: mp+204414@code.launchpad.net

Commit message

Changed custom zoom icons to theme icons

Description of the change

Changed custom icons to theme icons

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

Hey Tristan, as of Gtk 3.10 Gtk.Stock is deprecated. Please switch those to image.from_icon_name

review: Needs Fixing
Revision history for this message
Tristan Petersen (tristang4) wrote :

Hello, I've changed the code to remove Gtk.stock and added Gtk.Image.from_icon_name. Is it ready now?

Revision history for this message
Danielle Foré (danrabbit) wrote :

Tristan, can we use Gtk.IconSize.MENU instead? After that, looks good to me :)

review: Needs Fixing
Revision history for this message
Danielle Foré (danrabbit) wrote :

Actually, I'm getting output about "Unable to load icon extension" as well. If it's not a trivial fix, let's save that for another merge so we can get these zoom icons handled.

Revision history for this message
Tristan Petersen (tristang4) wrote :

> Tristan, can we use Gtk.IconSize.MENU instead? After that, looks good to me :)

Sure, we can try that, but I believe I tried a few different sizes and it felt like the size was being limited somehow (maybe by the retaining box?). I'll take a 2nd look.

Revision history for this message
Tristan Petersen (tristang4) wrote :

> Actually, I'm getting output about "Unable to load icon extension" as well. If
> it's not a trivial fix, let's save that for another merge so we can get these
> zoom icons handled.

I'm not sure what that is or where it's being displayed, but I did test by compiling from scratch and it seemed to work for me - I saw a + and a - icon for them. Are you getting some debug output somewhere?

Revision history for this message
Danielle Foré (danrabbit) wrote :

Yep, the icon change works fine for the zoom icons. But the extension icon change is giving output in the terminal. It's because of this:

- public const string ICON_GENERIC_PLUGIN = "generic-plugin.png";
+ public const string ICON_GENERIC_PLUGIN = "extension";

2508. By Tristan Petersen

Changed icon size to Gtk.IconSize.MENU, reverted change on extensions

Revision history for this message
Tristan Petersen (tristang4) wrote :

Aha, gotcha.

I changed the icon size to Gtk.IconSize.MENU for the zoom icons and removed any changes to the extension icon code. It looks like that code is a little more involved, so best saved for a separate branch.

Revision history for this message
Danielle Foré (danrabbit) :
review: Approve
Revision history for this message
Danielle Foré (danrabbit) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'icons/zoom-in.png'
2Binary files icons/zoom-in.png 2010-08-12 21:43:53 +0000 and icons/zoom-in.png 1970-01-01 00:00:00 +0000 differ
3=== removed file 'icons/zoom-out.png'
4Binary files icons/zoom-out.png 2010-08-12 21:43:53 +0000 and icons/zoom-out.png 1970-01-01 00:00:00 +0000 differ
5=== modified file 'src/MediaPage.vala'
6--- src/MediaPage.vala 2013-02-21 22:31:41 +0000
7+++ src/MediaPage.vala 2014-02-24 02:51:53 +0000
8@@ -120,8 +120,7 @@
9 public ZoomSliderAssembly() {
10 Gtk.Box zoom_group = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
11
12- Gtk.Image zoom_out = new Gtk.Image.from_pixbuf(Resources.load_icon(
13- Resources.ICON_ZOOM_OUT, Resources.ICON_ZOOM_SCALE));
14+ Gtk.Image zoom_out = new Gtk.Image.from_icon_name(Resources.ICON_ZOOM_OUT, Gtk.IconSize.MENU);
15 Gtk.EventBox zoom_out_box = new Gtk.EventBox();
16 zoom_out_box.set_above_child(true);
17 zoom_out_box.set_visible_window(false);
18@@ -144,8 +143,7 @@
19
20 zoom_group.pack_start(slider, false, false, 0);
21
22- Gtk.Image zoom_in = new Gtk.Image.from_pixbuf(Resources.load_icon(
23- Resources.ICON_ZOOM_IN, Resources.ICON_ZOOM_SCALE));
24+ Gtk.Image zoom_in = new Gtk.Image.from_icon_name(Resources.ICON_ZOOM_IN, Gtk.IconSize.MENU);
25 Gtk.EventBox zoom_in_box = new Gtk.EventBox();
26 zoom_in_box.set_above_child(true);
27 zoom_in_box.set_visible_window(false);
28
29=== modified file 'src/PhotoPage.vala'
30--- src/PhotoPage.vala 2014-01-25 04:39:25 +0000
31+++ src/PhotoPage.vala 2014-02-24 02:51:53 +0000
32@@ -490,8 +490,7 @@
33
34 Gtk.Box zoom_group = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
35
36- Gtk.Image zoom_out = new Gtk.Image.from_pixbuf(Resources.load_icon(Resources.ICON_ZOOM_OUT,
37- Resources.ICON_ZOOM_SCALE));
38+ Gtk.Image zoom_out = new Gtk.Image.from_icon_name(Resources.ICON_ZOOM_OUT, Gtk.IconSize.MENU);
39 Gtk.EventBox zoom_out_box = new Gtk.EventBox();
40 zoom_out_box.set_above_child(true);
41 zoom_out_box.set_visible_window(false);
42@@ -512,8 +511,7 @@
43
44 zoom_group.pack_start(zoom_slider, false, false, 0);
45
46- Gtk.Image zoom_in = new Gtk.Image.from_pixbuf(Resources.load_icon(Resources.ICON_ZOOM_IN,
47- Resources.ICON_ZOOM_SCALE));
48+ Gtk.Image zoom_in = new Gtk.Image.from_icon_name(Resources.ICON_ZOOM_IN, Gtk.IconSize.MENU);
49 Gtk.EventBox zoom_in_box = new Gtk.EventBox();
50 zoom_in_box.set_above_child(true);
51 zoom_in_box.set_visible_window(false);
52
53=== modified file 'src/Resources.vala'
54--- src/Resources.vala 2014-01-24 21:24:16 +0000
55+++ src/Resources.vala 2014-02-24 02:51:53 +0000
56@@ -109,8 +109,8 @@
57 public const string ICON_FILTER_THREE_OR_BETTER = "three-star-filter-plus.svg";
58 public const string ICON_FILTER_FOUR_OR_BETTER = "four-star-filter-plus.svg";
59 public const string ICON_FILTER_FIVE = "five-star-filter.svg";
60- public const string ICON_ZOOM_IN = "zoom-in.png";
61- public const string ICON_ZOOM_OUT = "zoom-out.png";
62+ public const string ICON_ZOOM_IN = "zoom-in-symbolic";
63+ public const string ICON_ZOOM_OUT = "zoom-out-symbolic";
64 public const int ICON_ZOOM_SCALE = 16;
65
66 public const string ICON_CAMERAS = "camera-photo";
67@@ -1141,4 +1141,4 @@
68
69 public const string ONIMAGE_FONT_COLOR = "#000000";
70 public const string ONIMAGE_FONT_BACKGROUND = "rgba(255,255,255,0.5)";
71-}
72\ No newline at end of file
73+}

Subscribers

People subscribed via source and target branches