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

List:       kde-core-devel
Subject:    Review Request 122563: [OS X] emulate native window settings restore (size and position)
From:       René J.V. Bertin <rjvbertin () gmail ! com>
Date:       2015-02-13 19:19:08
Message-ID: 20150213191908.9050.154 () probe ! kde ! org
[Download RAW message or body]

--===============1777187186259716564==
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/122563/
-----------------------------------------------------------

Review request for KDE Software on Mac OS X and kdelibs.


Repository: kdelibs


Description
-------

OS X applications usually remember the last used screen, size and screen position \
across restarts, and do not save screen-resolution dependent settings. 

The patch proposed here emulates that behaviour by following the example given in the \
documentation for `QWidget::saveGeometry`: the current geometry is saved in a key \
called `geometry`, and position is kept up to date by letting `QEvent::Move` dirty \
the size setting, as under MS Windows.

I think it's good practice to support previously stored settings when changing a \
config store, so the code attempts to restore "legacy" settings when the new key is \
unavailable.


Diffs
-----

  kdeui/widgets/kmainwindow.cpp 85beacc 

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


Testing
-------

On OS X 10.9.5 with Qt 4.8.6 and kdelibs 4.14.5 (head of the 4.14 branch); tested \
with systemsettings, kate and kontact.


Thanks,

René J.V. Bertin


--===============1777187186259716564==
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/122563/">https://git.reviewboard.kde.org/r/122563/</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 kdelibs.</div>
<div>By René J.V. Bertin.</div>










<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</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 applications usually remember the last used \
screen, size and screen position across restarts, and do not save screen-resolution \
dependent settings. </p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">The patch proposed here emulates that \
behaviour by following the example given in the documentation for <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">QWidget::saveGeometry</code>: the current geometry is saved \
in a key called <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">geometry</code>, and position \
is kept up to date by letting <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">QEvent::Move</code> dirty the size setting, as under MS Windows.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">I think it's good practice to support previously stored settings when \
changing a config store, so the code attempts to restore "legacy" settings when the \
new key is unavailable.</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;">On OS X 10.9.5 with Qt 4.8.6 and kdelibs 4.14.5 (head \
of the 4.14 branch); tested with systemsettings, kate and kontact.</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>kdeui/widgets/kmainwindow.cpp <span style="color: grey">(85beacc)</span></li>

</ul>

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






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



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


--===============1777187186259716564==--


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

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