Description: On newer LibreOffice Versions (7) in Linux the rendering of spin buttons and dropdown lists in Dialogues created in the Basic Dialogue Editor is very different at runtime. It looks like it uses parts of the UI instead what you see in the Editor. Instead of little up/down Arrows it uses huge +/- Buttons. This destroys the layout of custom macro dialogues and makes them unusable. Steps to Reproduce: 1.Create a Dialogue in the Basic Dialogue Editor with a numeric field with spin Buttons 2.Run it or use the preview Actual Results: Spin Buttons are huge +/- Buttons Expected Results: Spin Buttons should look like the little arrows you see in the Editor. Reproducible: Always User Profile Reset: No Additional Info: Tested in different Linux Distros: Linux Mint, Lubuntu, Q4OS in VirtualBox Linux Mint: Version: 7.3.7.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: de-DE (de_DE.UTF-8); UI: de-DE Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.2 Calc: threaded
Created attachment 186563 [details] Comparison_Dialogues_Editor-vs-Runtime
Created attachment 186610 [details] Odt for easy testing Dialogue To be able to invoke the basic Dialogue by pressing on the button enable macros in security options.
It seems to me that the wrong ui elements are used. Instead of the elements of the form-controls that are ok now the dialogs use the main ui-elements. This makes the editor useless
I tested your file with many different versions and it is like this with gtk3 already in version 5.2. So nothing that changed in version 7 as far as I can tell.
Thanks for testing. It worked ok with LO 4.4.7.2 on Lubuntu. This is when I created these extensions: https://extensions.libreoffice.org/en/extensions/show/change-multiple-images-in-writer-pictool https://extensions.libreoffice.org/en/extensions/show/chorddiagrams https://extensions.libreoffice.org/en/extensions/show/chordtransposer and a lot more of dialogues for this project: http://struckkai.blogspot.de/2015/04/libreofficesongbookarchitect.html All these are nowadays only usable on Windows and broken on Linux (although they look ok in the Editor on the Linux Versions!!!) So I'm asking for a solution to make the dialogues appear the same as they are constucted in the Editor.
So the bug really is that the editor does not use the proper main elements (i.e., the opposite)? Because I doubt that using inconsistent UI is OK. A workaround for OP could be using gen VCL plugin?
It was always basically this way. There's no great solution that won't cause a pitch fork wielding march. But vcl has EnableNativeWidget(false) to turn off the (older) use system theme for vcl widgets stuff which would make the basic dialogs look like they do during editing so that is possible to do.
Thank you! Indeed I can get better results by using this switch for Linux: if getGUIType>1 then oPicDlg.getPeer().setProperty( "NativeWidgetLook", False ) This helps a lot and makes the Dialogues appear almost like in the Editor. Now refine the problem to this: Too large height of Number- and Textfields with spin buttons or arrows. (Number- and Textfields without spin buttons or arrows are correct.) This is the case with or without NativeWidgetLook on all Linux/Libreoffice combinations I tried. The PDF shows a comparison.
Created attachment 186768 [details] Comparison_Dialogues_Editor_vs_Runtime_NativeWidgetLook_False The Comparison shows that on Linux all Text- and Number-Fields that have spin button or dropdown arrows have a too large height.
Created attachment 186923 [details] Macro_Dialogue_Comparison_Test.odt This is a .odt for testing the size of Textfields and Numeric Fields with and without spinbuttons or dropdown arrows. Ther are 2 buttons for invoking the dialogue with or without setting NativeWidgetLook=False On Windows the height of all fields are the same, on Linux they are different.
ah ok, there is a minimum height for these fields to show at runtime. On Windows you can go down to 10, on Linux only about 16.
Created attachment 187008 [details] Macro_Dialogue_Comparison_Test3.odt I can now narrow down the bug: Small Numeric and Text-Boxes render too large at runtime on Linux (wrong height) If NativeWidgetLook is set to False then I can fix the size of the boxes during runtime by resizing them. (adding 1 then immediately subtracting 1) This only works with the NativeWidgetLook=False-Version. It has no effect on native Dialog. Here's a test file to run a dialog with 1.NativeWidgetLook=True 2.NativeWidgetLook=False The dialog has a button to fix the wrong size. It only works on 2. (and shouldn't be needed at all - as on Windows) (Please tell me if I should file a new bug instead of posting here.)
I experience this bug: https://bugs.documentfoundation.org/show_bug.cgi?id=154745#c12 in: LibreOffice 7.3.7.2 on Linux Mint 21 LibreOffice 7.3.2.2 on Lubuntu 22.04 LibreOffice 7.0.4.2 on Q4OS Trinity but not in: Openoffice 4.1.13 on Linux Mint 21 LibreOffice 5.0.3.2 on Linux Mint 17.3 Cinnamon
Can anybody confirm comment 12? (Please tell me if I should file a new bug instead of posting here.)