Opened 13 years ago

Closed 13 years ago

#376 closed Enhancement (fixed)

Use freedesktop icon spec

Reported by: infernux Owned by:
Priority: Normal Milestone: 1.05
Component: GTK+ Client Version: 0.82
Severity: Minor Keywords:
Cc: elle.uca@…

Description

Split out from bug 343 (ex tango icon bug)

It would be nice if transmission would use the freedesktop icon spec for icons in the GTK client. This has the following advantages:

  • easy from a maintainers pov (no need to generate inline images etc)
  • ability to support more than one size of an icon (to avoid scaling)
  • ability to support accessibility themes like HighContrast?

Attachments (11)

data.tar.bz2 (41.8 KB) - added by infernux 13 years ago.
data/directory with icons
tr-icons.diff (5.1 KB) - added by infernux 13 years ago.
Patch
Screenshot.png (23.4 KB) - added by infernux 13 years ago.
Screenshot showing LargePrint?
icons.tar.bz2 (17.1 KB) - added by infernux 13 years ago.
Tango App icon only
sizes.png (58.9 KB) - added by infernux 13 years ago.
Bad look in current SVN
Screenshot.2.png (26.9 KB) - added by infernux 13 years ago.
Tray screenshot
tr.diff (2.9 KB) - added by infernux 13 years ago.
New patch
transmission.png (841 bytes) - added by infernux 13 years ago.
New 16x16 app icon (png)
transmission.svg (13.7 KB) - added by infernux 13 years ago.
New 16x16 app icon (svg)
transmission-icons-and-about-dialog.diff (4.5 KB) - added by LucaFerretti 13 years ago.
Stupid me.. Before I've attached the wrong version…
icons-new.tar.bz2 (17.7 KB) - added by infernux 13 years ago.
final icon pack

Download all attachments as: .zip

Change History (33)

Changed 13 years ago by infernux

data/directory with icons

Changed 13 years ago by infernux

Patch

comment:1 Changed 13 years ago by infernux

This really tries to keep the changes at minimum. The previous bunch of folders/makefiles has been reduced to one flat directory with a rather intelligent makefile (thanks to the epiphany developers for the idea).

At a user's point of view not much will change after this patch: the info icon will be clearer as it doesn't need to be scaled down anymore and the application icon is now available in a 16x16 version for the window icon (official logo, not the tango version)

Changed 13 years ago by infernux

Screenshot showing LargePrint?

comment:2 Changed 13 years ago by charles

  • Severity changed from Normal to Minor

comment:3 Changed 13 years ago by charles

  • Resolution set to invalid
  • Status changed from new to closed

The info button provided in the screenshot does indeed look better than the gtk+ stock icon, but IMO you should file the bug report against gtk+, not Transmission, so that when it's fixed all gtk+ apps will see the improvement.

Adding our own info icon meets the ticket's rationale: it's not easier to bundle along various sizes of an an icon than it is to use GTK_STOCK_INFO. Also, the more custom icons we use, the less likely it is that we'll support accessability themes out-of-the-box.

comment:4 Changed 13 years ago by infernux

Sigh... this bug was not just about the info icon. What I was trying to get was compliance with the freedesktop icon theme spec and a way to provide more than one size of the application icon for the launcher, system tray and window title bar. As a next step, we could have included a HighContrast? version of the application icon for example, I'm sure Andreas would have been happy to do one.

As for the info icon: the icons shipping with gtk do not provide the means of supporting a11y themes (it's only 16x16 and 22x22 and will stay that way). Most of the GTK icons have counterparts in the icon spec so this is no problem, but gtk-info does not (and thus is not included in gnome-icon-theme for example, were we should probably try to get it nevertheless. I will ask for this to happen!)

So where does this leave us? The current launcher icon is loaded from pixmaps/ and is only available in one size (48x48), which is being scaled down for use in the start menu (22x22). For use in transmission itself, the same 48x48 icon is being compiled-in for the tray (22x22) and window icon (16x16), which leads to scaling down again. All those sizes are available and could be installed/used very easily by the patch I provided here. Installing a separate HighContrast? icon would be very easy in this case, too.

Do you actually like how the icon looks scaled down to smaller sizes? And do you think including an icon as a GdkPixbuf? inline is a good idea?

Changed 13 years ago by infernux

Tango App icon only

comment:5 Changed 13 years ago by infernux

  • Resolution invalid deleted
  • Status changed from closed to reopened

Well, I don't want to waste any more time here, so I just attach the icons directory with the various sizes of the Tango icon Andreas did, ready to be installed to the hicolor theme. I would love to update the patch, too... but only if you want to actually make the change.

comment:6 Changed 13 years ago by charles

  • Milestone changed from None Set to 0.90
  • Resolution set to fixed
  • Status changed from reopened to closed

I'm going to close this ticket because I think we're in agreement on most everything except the icons, and everything else you've listed has been put into svn.

I appreciate all the suggestions you've given. If you find any more HiG/usability improvements that can be made to the gtk+ client, I'd be happy to read them. :)

Changed 13 years ago by infernux

Bad look in current SVN

comment:7 Changed 13 years ago by infernux

Well, this bug was *only* about icons.

Did you ever try the patch? This brings a HUGE visual improvement by removing the need for icon scaling with only very small code changes. And don' tell me shipping a few icons more is that much of a problem, we don't live in 1995 anymore. We talk about 4 png icons and one svg here, this is only a few KB.

I attached another screenshot for people to see, perhaps someone else will comment and explain better why this is the right thing to do...

comment:8 Changed 13 years ago by infernux

Update: the Mac client also has icons in all kinds of sizes now :(

comment:9 Changed 13 years ago by charles

  • Milestone changed from 0.90 to 1.10
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:10 Changed 13 years ago by charles

  • Milestone changed from 1.10 to 1.02

comment:11 Changed 13 years ago by charles

infernux: I'm still leaning towards adopting this ticket, but it actually makes the T icon in gnome-panel look much worse to me. Applying your patch works correctly (nice makefile in the icons directory, btw) but in the panel, T's icon shows up as the small 16x16 icon no matter how large I make the panel. Why is this? The larger, more detailed icon is much nicer IMO.

comment:12 Changed 13 years ago by infernux

What exactly does not work, the icon for a .desktop launcher you place on the panel, the icon used in the panel tray (notification area) or the icon shown for the TR window in the window list? Please attach a screenshot, I'm sure this can be fixed.

comment:13 Changed 13 years ago by charles

  • Milestone changed from 1.02 to 1.03

comment:14 Changed 13 years ago by infernux

I tried parts of the patch above and everything seemed to work as it should... The tray icon was *never* using the 16x16, as I'm unable to resize my panel to less than 21px. The only strange thing is that it never used the 48x48 bitmap either... but I noticed the bluetooth applet and update-manager behave the same. In fact I think the problem is with the notification area or -spec, because most apps show different behaviour here.

But I'm really surprised it showed the 16x16 icon for you... was that the only size that you had installed perhaps?

Changed 13 years ago by infernux

Tray screenshot

comment:15 Changed 13 years ago by infernux

I'm going to attach a simplified patch against trunk. This patch requites the "icons.tar.bz2" to be unpacked in gtk/ first. It replaces all usage of transmission-logo with the transmission icon from hicolor and removes the named icon. The following files are unused after this patch: gtk/logo.h, gtk/transmission.png

I asked Andreas to rework the 16x16 icon btw and he said he would do it soon.

Changed 13 years ago by infernux

New patch

comment:16 Changed 13 years ago by charles

  • Type changed from Bug to Enhancement

infernux: any word on when Andreas will be able to get to the new icon?

comment:17 Changed 13 years ago by charles

  • Milestone changed from 1.03 to 1.10

Changed 13 years ago by infernux

New 16x16 app icon (png)

Changed 13 years ago by infernux

New 16x16 app icon (svg)

comment:18 Changed 13 years ago by infernux

Andreas just sent me this 16x16 version. Do you like it? Anything else to fix or improve?

comment:19 Changed 13 years ago by LucaFerretti

  • Cc elle.uca@… added

Agree with infernux, Transmission have to install its application icons at multiple sizes under $prefix/share/icons/hicolor if it wants to be a good citizen on GTK/GNOME/freedesktop.org desktop.

The application icon at multiple size is important for desktop integration. I suggest you to provide and install the 48x48 PNG too, derived from svg: we are currenlty do this in GNOME Desktop applications due to the GTK+ icon cache feature.

Of course the missing sizes for GTK_STOCK_INFO should be installed elsewere, i.e. the LargePrint icon theme provided by gnome-theme package. If you have 32x32 and 48x48 version for this icons, please tell me and I'll add to gnome-themes.

Just for developers references, is you will have to install some custom "stock" icons, the best approach to do this is described here: http://live.gnome.org/ThemableAppSpecificIcons

BTW: could you please tell me what's the latest patch and data version so I can apply on my sandbox and review them?

comment:20 Changed 13 years ago by infernux

Luca, what license do you need the info icon for incusing in the LargePrint? theme? Anyway, please ask Andreas for it, he has done a complete set of info icons.

For testing this, use tr.diff against trunk and unpack icons.tar.bz2 inside the gtk/ directory (I think). Replace the 16x16 icon with the ones I attached last. The only un-themed icon TR currently uses is the "encrypted peer" icon.

comment:21 Changed 13 years ago by LucaFerretti

The patch is good: it's the well behaving method to manage application icons in GNOME/GTK+/fd.o. I've also tested the make distcheck and it's fine.

I've just updated it with some changes to about() function: put the about dialog in the middle of transmission window, not in the middle of the screen and use gtk_show_about_dialog() instead gtk_about_dialog_set*().

A couple of notes, unrelated with ticket topic:

  • the license is untranslated...
  • "The Transmission binaries and most of its source code is distributed license" ... am I wrong or there is something missing in this phrase?

Changed 13 years ago by LucaFerretti

Stupid me.. Before I've attached the wrong version...

Changed 13 years ago by infernux

final icon pack

comment:22 Changed 13 years ago by charles

  • Milestone changed from 1.10 to 1.05
  • Resolution set to fixed
  • Status changed from reopened to closed

trunk: r4967 1.0x: r4968

Note: See TracTickets for help on using tickets.