On 2020-08-06 14:57, Stephan Witt wrote:
Am 06.08.2020 um 07:37 schrieb racoon <xraco...@gmx.de>:

On 2020-08-06 07:28, Stephan Witt wrote:
Am 06.08.2020 um 05:01 schrieb Daniel <xraco...@gmx.de>:

On 2020-08-06 00:02, Stephan Witt wrote:
Am 05.08.2020 um 12:47 schrieb Stephan Witt <st.w...@gmx.net>:

Am 04.08.2020 um 05:36 schrieb Daniel <xraco...@gmx.de>:

On 2020-08-04 00:03, Daniel wrote:
On 2020-08-03 22:43, Stephan Witt wrote:
Am 03.08.2020 um 16:52 schrieb Daniel <xraco...@gmx.de>:

On 3/8/20 16:20, Jürgen Spitzmüller wrote:
Am Montag, den 03.08.2020, 16:09 +0200 schrieb Daniel:
Thanks. I hope you did not compile the list manually. :)
No: grep setFlat *.h
I was actually hoping that there could be a general way to affect all
boxes with "one" call. But if my search for this does not bear
fruit, I'll resort to the manual solution.
I doubt you can do this generally.

Seemed to me like something one should be able to do. But probably I will need 
to ask on stackexchange…

Something like the attached patch? It’s only a hack for the preferences to get 
the idea.

This can be put in a helper method and called when it seems appropriate.

Stephan


Nice! It seems to work as expected. And I think it improves the readability of the 
preferences on mac. My hunch is that we would want the analogue for every other OS but 
with "setFlat(true)" because currently not all group boxes are set to flat and 
likely some will be missed in the future.

Just to be sure: the method relies on the particular creation process of panels 
by the Preferences dialog, right? It can probably be adapted for the Document 
Settings dialog but would not (easily) work on the lowesy (application) level.

Yes, the method enumerates the child widgets after initial UI setup. This 
method works for the Preferences dialog as the code is placed there.

Other methods I can imagine would be:
1. put the code at a lower level of the class hierarchy for dialogs and make it 
more general that way or
2. create a own GUI class derived from QGroupbox, override the init code and 
use that instead of the Qt class (don’t know how to do this in designer)
Next patch with more general scope - I’ve moved the code to dialog factory 
utility GuiView::findOrBuild().

Great, seems to work everywhere as expected (dialogs and widgets). So, I guess 
what is missing is the part with:


#else
        flatGroupBoxes(dialog->asQWidget(), true);


May be. I did not hear the applause for your proposal :)
So, I’d rather left it as an open task for an improvement for other devs.

Stephan

I am a bit worried this will get lost then. I seem to remember that when
I first saw that group boxes where sometimes flat and suggested to give
them their default layout, that Jürgen said that they should be
invariably flat. But seeing the effect on macOS, he probably thought
it's okay with the default there. So, I am inclined to think that he
would applaud these changes.

This would be this patch then. I cannot see the big deal to set the flat
flag on Linux. With QtDesigner on Linux and Qt 5.9.7 the difference is not
obvious to me. See the screen-shots I’ve attached. More or less space only.
Personally I’d prefer non-flat on Linux too.

If I understood the situation on Linux correctly, then it depends on the user what style is used. So, there can be quite some variation depending on the user's choice.

--
Daniel

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to