Re: style not drawing menu section/separator if 1st in menu

2017-03-21 Thread René J . V . Bertin
Christoph Feck wrote: > On 21.03.2017 16:36, René J. V. Bertin wrote: >> FWIW the same thing happens with both Breeze and Oxygen in their Qt4 >> versions. > > Expected, since QMenu:addSection() is new in Qt 5. True, but not the possibility to set a text hint on a separator. I should have mentio

Re: style not drawing menu section/separator if 1st in menu

2017-03-21 Thread Christoph Feck
On 21.03.2017 16:36, René J. V. Bertin wrote: FWIW the same thing happens with both Breeze and Oxygen in their Qt4 versions. Expected, since QMenu:addSection() is new in Qt 5. Anyway, I researched a bit, you want QStyle::SH_Menu_SupportsSections.

Re: style not drawing menu section/separator if 1st in menu

2017-03-21 Thread René J . V . Bertin
René J. V. Bertin wrote: >> Always test with Fusion style. If it works there, the bug is in QtCurve. > > FWIW the same thing happens with both Breeze and Oxygen in their Qt4 versions. For future reference: In the end I got out the debugger and traced the issue into Qt, realising that a style

Re: style not drawing menu section/separator if 1st in menu

2017-03-21 Thread René J . V . Bertin
Christoph Feck wrote: > Always test with Fusion style. If it works there, the bug is in QtCurve. FWIW the same thing happens with both Breeze and Oxygen in their Qt4 versions. R.

Re: style not drawing menu section/separator if 1st in menu

2017-03-20 Thread René J . V . Bertin
Christoph Feck wrote: > Always test with Fusion style. If it works there, the bug is in QtCurve. Evidently, but that was never the question. I'm trying to find the bug or whatever it is in QtCurve...

Re: style not drawing menu section/separator if 1st in menu

2017-03-20 Thread Christoph Feck
On 20.03.2017 18:45, René J. V. Bertin wrote: The style I use (QtCurve) renders texted separators just fine, but not at the top of a menu. Always test with Fusion style. If it works there, the bug is in QtCurve.

Re: style not drawing menu section/separator if 1st in menu

2017-03-20 Thread René J . V . Bertin
Kai Uwe Broulik wrote: > Separators cannot be at the beginning or end of a menu and there can't be two > next to each other. Section is what you want to use for labeled entries but > for styles that don't implement that they'll be regular separators. I know, those are the functional differences.

Re: style not drawing menu section/separator if 1st in menu

2017-03-20 Thread Kai Uwe Broulik
Separator vs Section? Separators cannot be at the beginning or end of a menu and there can't be two next to each other. Section is what you want to use for labeled entries but for styles that don't implement that they'll be regular separators.

style not drawing menu section/separator if 1st in menu

2017-03-20 Thread René J . V . Bertin
Hello, I just noticed that my usual widget style fails to draw menu sections and separators if they're the 1st item in a menu. Not a big deal for regular separators, more so for texted separators aka menu sections. It seems that Style::sizeFromContents() and Style::drawControl() aren't even ca