GNOME Bugzilla – Bug 131221
incomplete display of clock data with reduced panel width
Last modified: 2015-03-24 13:00:52 UTC
I am running Gnome community head build(2.5.2), dated 07th Jan 2004 on linux. Steps to reproduce: 1. Create new verical panel, 2. Add Clock applet to newly created panel, 3. Clock data is displayed with default format, 4. Reduce the width of panel by right click on the verical panel Select ->Properties ->Size (Say 30) 5. Panel width is reduces as desired by the above step. 6. Observe that Clock data is displayed partially. Expected result: Clock data should be displayed completely.
Created attachment 25721 [details] [review] the fix. This utilizes panel applet size.
This is totally broken, there's no way we're reducing the font size one vertical panels. I don't know what a good answer is, but this isn't it.
what if the time were to be displayed in the tooltip. Currently only the date is shown. I don't know whether this is a good answer or not :).
Another solution could be to display the date-time (Tue Jun 1, 11:59) as : Tue Jun 01 11:59 on the vertical panel.
But it behaves same as other applets. Doesn't fish applet becomes smaller and smaller on panel when width is decreased. It should be upto the user that how much wide the panel should be in order to view the clock. It maintains common behaviour of resizing by applets.
Created attachment 28759 [details] [review] The Fix, utilizes clock applet size and clock format The problem overcomes by changing the clock applet size and by changing the clock format, according to the vertical panel size.
This is similar to bug #96341
*** Bug 96341 has been marked as a duplicate of this bug. ***
Bug 96341 also has an extensive discussion about how to implement the clock on a vertical panel.
Created attachment 32584 [details] [review] another patch Here is another, somehow simpler, patch. It spreads the clock on up to 3 lines, depending on the panel size and orientation. I tried to keep it light on the pixel sizes so it would work with a majority of font sizes. I did not include a 4-lines mode (ie weekday/day/month/time) as with 3 lines the time is already the widest element anyway. The patch has the nice side-effect of removing one of two similar translatable strings :-)
Also : I connected the applet to the size-allocate signal, instead of size-change. Otherwise it doesn't work (the applet does not have the right size, etc - as usual :-P)
There's something I don't understand... We're calling gtk_label_set_line_wrap (label, TRUE). So why doesn't it automatically wrap?
Hrm. Note that this doesn't happen just to the clock- other applets, like the addressbook applet, also seem a bit busted. Thoughts?
If anybody know why it doesn't automatically wrap, you can make a happy man today by explaining me ;-)
According to bug #313807, the clock is not displayed vertically on vertical panels. Yay ! :)