Groupbox layout

Stephan Witt st.witt at gmx.net
Wed Aug 5 22:02:05 UTC 2020


Am 05.08.2020 um 12:47 schrieb Stephan Witt <st.witt at gmx.net>:
> 
> Am 04.08.2020 um 05:36 schrieb Daniel <xracoonx at 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 <xracoonx at 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().

Stephan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GuiViewGroupBoxesFlat.patch
Type: application/octet-stream
Size: 1424 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200806/8b0ab5df/attachment.obj>


More information about the lyx-devel mailing list