<table><tr><td style="">rjvbb created this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5286" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This patch introduces an optional new/modern look for named menu section headers to the Qt4 and Qt5 style plugins.</p>

<p>The context:<br />
I have been tinkering with (minimal changes to) Qt's Cocoa backends to enable full support of named menu sections ("texted separators") on Mac, so that <tt style="background: #ebebeb; font-size: 13px;">QMenu::addSection()</tt> can be used more reliably for menu organisation. Native menubar menus are the limiting factor there; the other menus adopt a slightly elaborated version of the solution that works in native menus. The resulting look is inspired by Google Chrome's solution as used e.g. in its history menu but also borrows from Fusion's design.</p>

<p>Initially I planned to propose a hardwired implementation of that menu section header design in QtCurve on Mac so that menus there (not attached to the native menubar) look more like how they could look with the native "macintosh" style. Then I noticed I prefer the new look over the old "button-like" look which I always found somewhat confusing, and realised others might too.</p>

<p>The current design uses left-aligned text, underlined and rendered in bold, with an overlying separator that is also left-aligned. Alignment is done w.r.t. the check/icon position, and of course flips when switching to a right-to-left rendering mode. On Mac there is also a tiny amount of letter-spacing contraction to increase visual impact (this doesn't work well with the Freetype engine IMHO).</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tested on both Mac (Cocoa and X11) and Linux (X11).</p>

<p>I have zero experience with GTk2 coding but if that UI toolkit also has texted separators we should probably implement them.</p>

<p>It would be interesting to have some kind of usability study (or results from such a study) that show to what extent named menu sections are a good idea, and how they could/should be rendered.</p>

<p>For instance, I am not convinced by Breeze's design using centred text above a separator. That looks jarring to me, not helping readability at all.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R626 QtCurve</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5286" rel="noreferrer">https://phabricator.kde.org/D5286</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>gtk2/common/common.h<br />
gtk2/common/config_file.cpp<br />
qt4/common/common.h<br />
qt4/common/config_file.cpp<br />
qt4/config/qtcurveconfig.cpp<br />
qt4/config/qtcurveconfigbase.ui<br />
qt4/style/qtcurve.cpp<br />
qt5/common/common.h<br />
qt5/common/config_file.cpp<br />
qt5/config/qtcurveconfig.cpp<br />
qt5/config/qtcurveconfigbase.ui<br />
qt5/style/qtcurve_api.cpp</div></div></div><br /><div><strong>To: </strong>rjvbb, yuyichao<br /><strong>Cc: </strong>Plasma, kde-mac, Frameworks<br /></div>