Proposal for new system (was: Re: How does the SpecialSpacer system work?)

Friedrich W. H. Kossebau kossebau at kde.org
Sat Apr 7 15:00:01 BST 2012


So currently all optionwidgets need to add a SpecialSpacer to signal that 
there is no UI gain in letting them stretch if put together with others.

I wonder if this system could perhaps be reversed.
E.g. by that all those optionwidgets which gain from being stretched have a 
QObject property set to mark that they have a desire to get stretched.

	optionWidgetWithList->setProperty("CA_STRETCH_ME", QVariant(true));

And modebox and tooldocker would just search for any optionwidget which has 
this property set and true and only add the bottom spacer if none has this.

Pros:
* there are less optionwidgets which need to be marked,
  so less chances to forget this marker
* saves the memory footprint for the additional SpecialSpacer widgets
  and enlarged layouts
* no need to loop over all widgets in an optionwidget

Cons:
* needs someone to implement this (okay, I will do it)
* ?

What do you think? Should I prepare a patch doing that?

Cheers
Friedrich




More information about the calligra-devel mailing list