diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-24 18:44:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-24 23:17:19 +0000 |
commit | 980fe99410477f6a4bd0dc935c9e63fa0aad2b0e (patch) | |
tree | d4d7408fb915032b79919a9a2210878976977a4e /vcl | |
parent | 9c43037ccb281df6c0b143b850b1f48e22660e4a (diff) |
be more forgiving on 768 height screens to allow dialogs occupy more height
Change-Id: Ie9e53606d84fb1efd738709de64feecaabff9328
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dialog.cxx | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index c1e58c084972..8683ab656329 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -633,25 +633,24 @@ long Dialog::Notify( NotifyEvent& rNEvt ) return nRet; } +//What we really want here is something that gives the available width and +//height of a users screen, taking away the space taken up the OS +//taskbar, menus, etc. Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize) { long w = rScreenSize.Width(); - long h = rScreenSize.Height(); + if (w <= 800) + w -= 15; + else if (w <= 1024) + w -= 65; + else + w -= 115; - // fill in holy default values brought to us by product management - if (rScreenSize.Width() >= 800) - w = 785; - if (rScreenSize.Width() >= 1024) - w = 920; - if (rScreenSize.Width() >= 1280) - w = 1050; - - if (rScreenSize.Height() >= 600) - h = 550; - if (rScreenSize.Height() >= 768) - h = 630; - if (rScreenSize.Height() >= 1024) - h = 875; + long h = rScreenSize.Height(); + if (h <= 768) + h -= 50; + else + h -= 100; return Size(w, h); } |