[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-mac
Subject:    Review Request 129008: [OS X] add a setting to use non-native ("in-window") menubars
From:       René J.V. Bertin <rjvbertin () gmail ! com>
Date:       2016-09-23 21:03:31
Message-ID: 20160923210331.10493.85159 () mimi ! kde ! org
[Download RAW message or body]

--===============4052982652612900288==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129008/
-----------------------------------------------------------

Review request for KDE Software on Mac OS X and Yichao Yu.


Repository: qtcurve


Description
-------

OS X/macOS uses the well-known toplevel menubar by default, but menus and menu items \
in that bar are subject to restrictions. Notably they are reparented, which can lead \
to issues when they're intended to be used in multiple locations (menus). This is \
typically the case with menus and actions created via KXMLGui. A workaround can \
usually be found in that case, but that is not normally a trivial tweak for the \
average user.

An example: the Tools/Mode and Tools/Hightlighting menus from the KTextEditor \
framework, which are populated almost exclusively with disabled submenus.

The easiest workaround is not to use the native menubar, and this patch adds a \
possibility to achieve that via QtCurve. The straightforward command not to use a \
native menubar doesn't have the expected effect with all applications, so the feature \
is implemented as a per-application preference.

An attempt is made to handle changes in the setting dynamically, but due to the \
nature of the controlled widget it is strongly advised to restart the target \
application.

The settings are read and written on all platforms, but the actual menubar commands \
are executed only on OS X.


Diffs
-----

  qt4/common/common.h e32e76c 
  qt4/common/config_file.cpp 78e6982 
  qt4/config/qtcurveconfig.cpp e5378b1 
  qt4/config/qtcurveconfigbase.ui 6ef3295 
  qt4/style/qtcurve.cpp b7e6bea 
  qt5/common/common.h 045c13a 
  qt5/common/config_file.cpp 13ba077 
  qt5/config/qtcurveconfig.cpp 91b6471 
  qt5/config/qtcurveconfigbase.ui 35044bc 
  qt5/style/qtcurve.cpp ce15754 
  qt5/style/qtcurve_api.cpp f164ff1 

Diff: https://git.reviewboard.kde.org/r/129008/diff/


Testing
-------

Tested on OS X 10.9.5 and Linux, both with Qt 5.6.1 and FWs 5.24.0 installed into \
/opt/local


Thanks,

René J.V. Bertin


--===============4052982652612900288==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/129008/">https://git.reviewboard.kde.org/r/129008/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Software on Mac OS X and Yichao Yu.</div>
<div>By René J.V. Bertin.</div>










<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
qtcurve
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">OS X/macOS uses the well-known toplevel menubar by \
default, but menus and menu items in that bar are subject to restrictions. Notably \
they are reparented, which can lead to issues when they're intended to be used in \
multiple locations (menus). This is typically the case with menus and actions created \
via KXMLGui. A workaround can usually be found in that case, but that is not normally \
a trivial tweak for the average user.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">An example: the \
Tools/Mode and Tools/Hightlighting menus from the KTextEditor framework, which are \
populated almost exclusively with disabled submenus.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The \
easiest workaround is not to use the native menubar, and this patch adds a \
possibility to achieve that via QtCurve. The straightforward command not to use a \
native menubar doesn't have the expected effect with all applications, so the feature \
is implemented as a per-application preference.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">An \
attempt is made to handle changes in the setting dynamically, but due to the nature \
of the controlled widget it is strongly advised to restart the target \
application.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The settings are read and written on all platforms, \
but the actual menubar commands are executed only on OS X.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Tested on OS X 10.9.5 and Linux, both with Qt 5.6.1 \
and FWs 5.24.0 installed into /opt/local</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>qt4/common/common.h <span style="color: grey">(e32e76c)</span></li>

 <li>qt4/common/config_file.cpp <span style="color: grey">(78e6982)</span></li>

 <li>qt4/config/qtcurveconfig.cpp <span style="color: grey">(e5378b1)</span></li>

 <li>qt4/config/qtcurveconfigbase.ui <span style="color: grey">(6ef3295)</span></li>

 <li>qt4/style/qtcurve.cpp <span style="color: grey">(b7e6bea)</span></li>

 <li>qt5/common/common.h <span style="color: grey">(045c13a)</span></li>

 <li>qt5/common/config_file.cpp <span style="color: grey">(13ba077)</span></li>

 <li>qt5/config/qtcurveconfig.cpp <span style="color: grey">(91b6471)</span></li>

 <li>qt5/config/qtcurveconfigbase.ui <span style="color: grey">(35044bc)</span></li>

 <li>qt5/style/qtcurve.cpp <span style="color: grey">(ce15754)</span></li>

 <li>qt5/style/qtcurve_api.cpp <span style="color: grey">(f164ff1)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/129008/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>



  </div>
 </body>
</html>


--===============4052982652612900288==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic