[patch] KDialog::centerOnScreen()
Jaroslaw Staniek
js at iidea.pl
Wed Dec 28 10:03:52 GMT 2005
Aaron J. Seigo said the following, On 2005-12-27 19:25:
> On Tuesday 27 December 2005 04:45, Jarosław Staniek wrote:
>
>>Since KDE Kicker (and win32's "kicker") is "always on top", it could be
>>better for centered dialogs to use availableGeometry() instead of
>>screenGeometry(), to avoid covering them by Kicker (at least sometimes).
>
>
> it will look visually odd to have a dialog "centered" on the screen using
> anything but the physical extent of the whole screen geometry.
s/will/may/
The idea I am writing at all is that for typical settings current centering
strategy was odd. Encountered linux, win32. I can see macosx is affected too.
> what ought to
> be done is to ensure that the calculation made based on screen geometry
> doesn't cause overlap due to a smaller available geometry. in that case the
> dialog should be shifted/resized to compensate.
Resize is not an option in general, especially for screens with ~768 pixels
height giving you ~700 pixels. If it was, KDialog's size hint would do the job.
Example: I am displaying a print preview as a floating window (non-modal dialog)
that is by default as large as availableGeometry() of course, as user expects
to see
as much details on the preview by default (resizing the height to ~400 pixels
makes
the preview - 9 of 10 users would need to resize the window by hand).
I am talking about default kicker-on-bottom settings. See the attached
first.gif mockup.
Perhaps a variation of the idea could be even better: do the centering using
screenGeometry() horizontally and using availableGeometry() vertically, see
second.gif. This gives us correct behaviour for kicker-on-the-left/right-hand
setting too.
--
regards / pozdrawiam,
Jaroslaw Staniek / OpenOffice Polska
Kexi Developer: http://www.kexi-project.org | http://koffice.org/kexi
Kexi Support: http://www.kexi-project.org/support.html
Kexi For MS Windows: http://kexi.pl/wiki/index.php/Kexi_for_MS_Windows
KDE3, KDE4 Libraries For Developing MS Windows Applications:
http://www.kdelibs.com/wiki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: first.gif
Type: image/gif
Size: 1433 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051228/68672e12/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: second.gif
Type: image/gif
Size: 1438 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051228/68672e12/attachment-0001.gif>
More information about the kde-core-devel
mailing list