LibreOffice has a guideline for dialogues [1] it's not very detailed, but can be improved. If you have a look at the different .ui files you will see that each file is customized. Ordinary it look something like that: - GtkFrame - GtkAlignment - GtkLabel - GtkGrid - different widgets The problem is that GtkAlignment has .ui specific padding, GtkLabel has .ui specific attributs (bold), GtkGrid has .ui specific paddings, ... In the end each .ui file is unique, if you want to change the global dialog layout, you have to change > 500 .ui files and than you will also have specific differences. [1] https://wiki.documentfoundation.org/Design/PropertyDialog
Created attachment 154567 [details] Gnome Control Center with LibreOffice Dialog Widget Idea My enhancement will be to have ONE specific widget that can be use in ALL .ui Dialog files and this widget is defined in the LibreOffice guidelines. The Widget contain of an Header line with the Label and An Content Area where you can add than an GtkBox, GtkGrid element or whatever is needed for the Widget. Padding to other Widgets are predefined, Header Layout is predefined. As I love the Gnome Control Center with the colored boxes, the colored boxes are predefined.
I think with an additional widget we can save ~25% of the .ui code (no specific padding, no GtkAlignment widget, ...
In addition it will maybe give LOOL the "possibility" for a better usage of the .ui dialog files.
I will do the .ui update work. (Heiko will write the guideline.) So we only need an developer to make the widget. But only the widget is needed, no additional dev work. So we talk about - 10 % dev work - 70 % .ui change work (done by me) - 20 % guideline, usability, ... When the work is finished - consistent configure layout - more consistent .ui files - less widgets (less codebase) - more flexibility cause change can be done centralized - better platform integration
Szymon if I'd like to update the dialogues and add there some predefined layout widget would it be usefull to change something else in the .ui files for a better interoperability between desktop/browser/mobile. http://eszkadev.blogspot.com/2019/09/native-widgets-on-mobile-for-online.html
There is a script ./bin/lint-ui.py which has some amount of functionality in it to check dialogs against the guidelines. I could see that, or something like that, being improved to find inconsistent .uis and get them fixed up. And become a check-in git hook. I could see mass converting consistent .ui files to have different padding etc as not that difficult in the larger scheme of things. But I think trying to use some centralized widget for all dialogs as seriously difficult. We have a stupendous amount of ui
(In reply to Caolán McNamara from comment #6) > But I think trying to use some centralized widget for all dialogs as > seriously difficult. We have a stupendous amount of ui I don't suggest to make ONE big centralized widget the idea is to have ONE widget that contain - GtkFrame (generic) - GtkAlignment (generic) - GtkBox, GtkGrid, ... (specific) - GtkLabel (generic) I'd like to merge 3 widgets (generic) and define in - GtkFrame (generic) distance to other widgets maximal width - GtkAlignment (generic) define padding - GtkLabel define text attributes cause than we can change the layout of the dialogues centralize. As you can see the centralized widget didn't offer to much complexity. The goal should be that in the stupendous amount of ui files the developer didn't have to define ui specific paddings, ...
Wouldn't such a template work for, let's say, 50 dialogs while we have approx. 1000? Caolan's linting idea has also some charm.
This looks more like a meta ticket. We could resolve as moved since Andreas works on the topic with individual ticket but I don't want to loose Caolan's comment 6. So adjusting the summary.