D5286: QtCurve alternative style for named menu section headers (WIP)

René J.V. Bertin noreply at phabricator.kde.org
Mon Apr 3 08:54:59 UTC 2017


rjvbb created this revision.

REVISION SUMMARY
  This patch introduces an optional new/modern look for named menu section headers to the Qt4 and Qt5 style plugins.
  
  The context:
  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 `QMenu::addSection()` 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.
  
  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.
  
  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).

TEST PLAN
  Tested on both Mac (Cocoa and X11) and Linux (X11).
  
  I have zero experience with GTk2 coding but if that UI toolkit also has texted separators we should probably implement them.
  
  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.
  
  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.

REPOSITORY
  R626 QtCurve

REVISION DETAIL
  https://phabricator.kde.org/D5286

AFFECTED FILES
  gtk2/common/common.h
  gtk2/common/config_file.cpp
  qt4/common/common.h
  qt4/common/config_file.cpp
  qt4/config/qtcurveconfig.cpp
  qt4/config/qtcurveconfigbase.ui
  qt4/style/qtcurve.cpp
  qt5/common/common.h
  qt5/common/config_file.cpp
  qt5/config/qtcurveconfig.cpp
  qt5/config/qtcurveconfigbase.ui
  qt5/style/qtcurve_api.cpp

To: rjvbb, yuyichao
Cc: #plasma, kde-mac, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20170403/2b2339d2/attachment.html>


More information about the kde-mac mailing list