We’ve now reached 100 dialogs and tabpages converted from LibreOffice’s classic fixed widget size and position .src format to the GtkBuilder .ui editable by glade format. I won’t repeat the full reasons for the conversion, but I’m particularly happy with the new accessibility support, both for the new containers and the .ui loaded.
The a11y stuff can now generally be describable in the .ui file rather than sporadic hard-coded calls here and there. And with the new mnemonic widget for label support, setting in the .ui explicitly what a label is a label for overrides the (eventually to be removed) ugly guessing short-cut code in vcl and sets the default a11y relationship between the label and labelee.
So setting mnemonic widgets in LibreOffice .ui files is now strongly indicated.
Here’s a hopefully helpful step-by-step tutorial for converting a simple dialog from .src to .ui
- Tutorial step #1 initial .ui prototype
- Tutorial step #2 improve .ui prototype
- Tutorial step #3 change Dialog constructor
- Tutorial step #4 remove redundant button widget constructors
- Tutorial step #5 remove redundant FixedLine/FixedText constructors
- Tutorial step #6 convert first remaining widget
- Tutorial step #7 convert remaining widgets
- Tutorial step #8 remove FreeResource
- Tutorial step #9 clean unused .src|.hrc remainders
- Tutorial step #10 update help for .ui conversion
Nice tutorial, really concise and helpful. This way occasional devs like me can do something useful (possibly boring for a single person to do all the conversions). Thanks.
As a user who hated the dated and sometimes clumsy dialogs OO/LO has had for the longest time, I am so grateful for this rework, I cannot tell you how much. With the 4.0 release LO will make probably the hugest jump in UI consistency and elegance ever since the included desktop was ripped out. It really shows in so many places, and while the changes are not huge, and probably hardly noticeable to many people, on the whole this looks so new!
Thank You, Thank You, Thank You!
Thanks for the WidgetLayout work. Just a quick question: How many dialogs/tabpages do exist in LibreOffice, approximately?
looking at https://wiki.documentfoundation.org/Development/WidgetLayout
It seems that sometimes OK, CANCEL, HELP buttons are located by the right side or horizontally at the lower side. The presented new dialog boxes are not uniform and does not systematically correct old location.
The space between fields is also heterogeneous between the displayed examples. Furthermore vertical space is sometimes too low, and the old dialog box are much more readable.
Is there any rules or is it just do it, we’ll see later to do the work again. I am a little bit surprise that examples are so worse, in fact !
re “how many exist”, a surprisingly hard question to answer. I’ve decided to pick 300 as the number for now, to be revisited when we hit 300
re “vertical/horizontal buttons”. Yes, this is a rather odd situation. My rule of thumb is that the new dialogs stay the same as the old dialogs in terms or orientation on initial conversion. If they get re-worked then they can be reoriented with three clicks in glade.
The examples in the wiki are rather old unfortunately, only the “title page” dialog is what you see in a daily. I like to think that the reality is better now than those screenshots, now that we’re getting the hang of reusing the GNOME HIG guidelines. At the bottom of the widget layout wiki you can see the current outstanding candidates for review in terms of best spacing and positioning, etc.
Super-dooper easy hack for anyone with 20 minutes to spare is to re-take screen shots of those dialogs with a master to show the contemporary layout. It’s just a wiki, so no particular barriers to entry there.
In the real world case, that being the point of the exercise, anyone can git checkout libreoffice and point glade at any given offending dialog and fix it up without suffering the impossibility of the previous dialog description mechanism. No office restart required, just change the dialog in glade, save and relaunch the dialog in LibreOffice to see your changes.
[...] tje API change, LibreOffice is moving to a new graphics stack. This is based on GtkBuilder, which builds interfaces from an XML user interface (UI) definition. [...]