! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Make the clock list fit the size of the window
Status:
RESOLVED: WONTFIX
Component:
globaltime

Comments

Description Agustin Ferrari 2017-08-19 04:47:01 CEST
Created attachment 7287 
A Global Time mockup using tool palette widget that show clocks as a group of buttons whose disposition adapts to the size of the window.

I have noticed that you have this in the globaltime.c TODO list[1] for some time and maybe it could be resolved using GtkToolPalette[2]. I attached a demonstration made in Python of how the globaltime window would look with this widget (PyGTK needed). When resizing the window you can see how the list of clocks adapts to the new size.
Unfortunately it does not seem to be very customizable (for example, I did not find the way to hide the button that collapses the item group nor properly center the labels of the clocks) although perhaps it can be solved adapting in the existing code what makes that GtkToolPalette[3] or GtkToolItemGroup[4] readjust the distribution of the buttons to the size of the window.

[1]: https://git.xfce.org/apps/orage/tree/globaltime/globaltime.c#n25
[2]: https://developer.gnome.org/gtk2/stable/GtkToolPalette.html
[3]: https://git.gnome.org/browse/gtk+/tree/gtk/gtktoolpalette.c
[4]: https://git.gnome.org/browse/gtk+/tree/gtk/gtktoolitemgroup.c
Comment 1 Agustin Ferrari 2017-08-23 05:10:48 CEST
I discovered that with GtkFlowBox[1] it is possible to do the same thing as explained before and also allows to add any widget. There is a demonstration at https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/flowbox.c and a Python[2] version in case you are interested in doing a fast test. The problem is that to use it you would have to migrate the program to GTK+ 3 because it is only available there.

[1]: https://developer.gnome.org/gtk3/stable/GtkFlowBox.html
[2]: http://python-gtk-3-tutorial.readthedocs.io/en/latest/layout.html#id5
Comment 2 Skunnyk editbugs 2019-10-27 18:39:56 CET
The orage project is not maintained anymore and has been archived. Closing bugs.

Bug #13799

Reported by:
Agustin Ferrari
Reported on: 2017-08-19
Last modified on: 2019-10-27

People

CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information