GNOME Bugzilla – Bug 531371
Bad icons arrangement in vertical mode.
Last modified: 2020-11-06 20:21:19 UTC
Please describe the problem:
When the notification area is placed on a vertical panel, the icons are not arranged properly.
Steps to reproduce:
1. Create a new panel (or use an existing panel) and attach it to the left or right side
of the screen (Properties / Orientation / Left|Right). Increase the width of the
panel to >=100px to make it usable.
2. Add a new (or move an existing) notification area applet the this panel.
3. Start a few applications that use the notification icons, e.g. Pidgin, Rhythmbox, Skype, Deluge, KeepassX, etc.
1. The icons are placed one on a row.
2. The icons have different sizes, some are 16x16, some are as large as 128x128.
1. It would be great if there would be several icons per row, all of them of the same size.
2. Also, it would be nice to be able to control the size, but the default 16px would work just fine.
Does this happen every time?
The current layout wastes a lot of screen real-estate and looks ugly. KDE, XP and Vista arrange notification icons much better.
I will attach screen-shots of how this looks in Gnome and in KDE.
Created attachment 110345 [details]
Notification Area in Gnome
Look at the bottom of the screen-shot.
Created attachment 110346 [details]
Notification Area in KDE
KDE handles notification icons much better. XP and Vista do it in the same manner.
Created attachment 116280 [details] [review]
Patch to layout icons in notifcation area more sanely
This should provide the desired behaviour
A few comments on the patch, without having even thought about this issue:
+ please use the same & consistent coding style (spaces and not tabs, "/* */" for comments, etc)
+ it doesn't seem to make sense to me to use the box and the table at the same time
+ what happens in tray_added if your table is full?
I realise the coding style in the patch needs some work - especially spaces vs tabs - but I wanted to get the patch up here quickly to get testing and feedback on the general approach - I expected it to go through a number of iterations - unfortunately the original code doesn't follow the GNOME coding style guidelines (8 space tabs etc) so its a little difficult to conform, but I will get the style of the patch into shape tonight.
I just reused the box to make sure the layout of the handle on the edge of the notification area is done correctly - if I remove the box, then the obox.c widget code can be removed I guess which would help clean things up - will see what I can do about this too then.
I didn't realise a table could be full - they can have up to 65535 rows and cols, so I don't think we are in any danger of filling it past that. If you mean going past the number of rows / cols set by gtk_table_resize, a GtkTable automatically resizes as new rows / columns are added to it in gtk_table_attach - although if you want a specific gtk_table_resize() call in tray_added that should be dead easy to add just before the gtk_table_attach call.
Thanks for the feedback - also have you tried it? Do you agree with the general approach I have taken? Cheers
Created attachment 116327 [details] [review]
Updated patch for enhanced layout
- Address style concerns using consistent spacing and comment style
- Removed obox.[ch] widget and simply use the new GtkTable
- Add explicit gtk_table_resize() call in tray_added()
- Cleaned up a couple of compiler warnings from the original patch
(In reply to comment #5)
> Thanks for the feedback - also have you tried it? Do you agree with the general
> approach I have taken? Cheers
I'm travelling right now, so I can't try it. And I need to think about it to be sure that it's really what we want :-) But it's good to have a patch to play with it.
It's a problem with lots of applets that they scale icons to panel width (or height in horizontal mode). On my panel it's launchers, the start menu, volume applet, mount applet and the inhibit applet, plus the notification area.
I think what all these applets should do is have a maximum size for the icon(s) and never scale bigger than that size. For the applets I've written, I've been chosing GTK_ICON_SIZE_LARGE_TOOLBAR and that has worked quite well.
@Vincent: have you had a chance to try out the patch? Can you give any status update on this?
@Vincent: ping for status again.. can you give any update?
I'd just like to confirm the bug (with Ubuntu Jaunty Alpha 4) and state that it is important to fix it. On a widescreen monitor, a vertical panel is much more useful than a horizontal one. It is already distressing that the window list doesn't work on a vertical menu, but that can be replaced with the window menu. There is no replacement for the notification area.
Seems to be reported here : https://bugs.launchpad.net/gnome-panel/+bug/322252 and here : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520918
Any news on that bug ?
Alex, your patch works great. There were a few conflicts, I will attach a version that applies clearly to git master. Could you check if I didn't break anything?
Created attachment 140510 [details] [review]
Updated to git master
This patch adds no functionality, it just resolves conflicts.
Vincent, could you please review it? 1-year long delays can be a bit discouraging for new Gnome contributors. Thanks!
Created attachment 145490 [details] [review]
Fixed number of rows/cols calculation
A commenter on my blog found a bug  in the previous version of the patch. When the number of rows == 1 (for vertical panel), the applet allocated two rows instead of one. Similarly, for the horizontal panel 1 column always turned into two. This patch fixes it.
There also seems to be a problem with narrow vertical panels, where the icons are not scaled down as required. It probably has the same cause, though, so I’m looking forward for the fix to be applied.
Created attachment 152613 [details]
This looks like the same issue. Sonata has a huge icon. At first it's displayed correctly but if you kill the panel, when it starts again, this is the result.
*ping* for patch review
Created attachment 174630 [details] [review]
Updated patch for gnome panel 2.30.2
I've updated the patch so that it patches and compiles cleanly with 2.30.2 now; it seems to work as well as before, but I make no guarantees! :)
I would love to see this included. I didn't check the patch but I'm suffering from really huge icons in gnome-panel's vertical mode..
vuntz: ping? - patch available for review.
A few things:
- it's unclear whether we want a table or not. This has been discussed several times, but there was no resolution.
- we use _NET_SYSTEM_TRAY_ICON_SIZE to specify the size of the icon, but on the side of the application. Maybe we should enforce this on the notification area too, though. But we should use the same size as _NET_SYSTEM_TRAY_ICON_SIZE.
(fwiw, I doubt the patch still applies to 3.0, and please attach patches in the unified format)
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years.
If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-panel/-/issues/
Thank you for reporting this issue and we are sorry it could not be fixed.