GNOME Bugzilla – Bug 531358
Applet height in vertical mode.
Last modified: 2008-05-09 08:39:14 UTC
When the quick lounge applet is placed on a vertical panel, the height of the applet is fixed and doesn't depend on the number of icons it contains. There's also no way to edit the height or move other applets into the unoccupied space. Steps to reproduce: 1. Create a new panel (or use an existing panel) and attach it to the left side of the screen (Properties / Orientation / Left). Increase the width of the panel to ~100px to make it usable. 2. Add a new (or move an existing) quick lounge applet the this panel. 3. Add another applet below the quick lounge, e.g. you can use the Window List applet. 4. Unless you have about a dozen of icon rows, there's a substantial gap between the last row and the start of the window list applet. I think the height of the applet should either be automatically adjusted to the number of icon rows it contains or allowed to be resized, like in the horizontal layout. I'm using Ubuntu 8.04 with Gnome 2.22 and quick-lounge-applet 2.12.4. I cannot find a way to attach a screen shot, but you can check one from http://ubuntuforums.org/attachment.php?attachmentid=67901 Thank you!
Created attachment 110344 [details] Shows the gap between the applets OK, now I know how to attach :)
It looks like the error is caused by the confusion in GtkRequisition's width and height members. In vertical layout, requisition->width returns the item's height, and requisition->height returns the width!!! This can easily be checked by setting an explicit value in quick-box.c line 367, e.g. requisition->width = 50; and observing how the HIGHT of the applet changes! It looks like the function quick_box_size_request() needs to be reviewed, there are a few places where the width is mistaken for the height and vice-versa. I will take another look on the function later this week but don't count on me too much, it's been awhile since I laid my hands on any C/C++ code %)
I managed to fix this, the patch is attached. I still have an issue with flashing applet when there's only one row of icons (in vertical mode). It's similar and very likely caused by the same bug as in bug 337815. A work-around is to add a space or more icons so that there are at least two rows. Please let me know if you have any questions on the patch. Mille grazie!
Created attachment 110583 [details] [review] Fix for this issue I added a small comment on the changes, look for a FIXME keyword.
Alexander, your patch looks good to me, I've now applied it to trunk, thanks.
Thanks Paolo!