From 03e8a1bc7ea1d9ccde95306e6a3e17fe5c0769ec Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 17 Jan 2009 13:39:21 +0000 Subject: [PATCH] Make the window size at first startup big as 3/4 of the available screen size. This currently does not seem to work as it should, because the max size is really contrained to 2/3 of the screen size, as per Qt behaviour (or bug?) Anyway, even 2/3 is better than before. svn path=/trunk/KDE/kdegraphics/okular/; revision=912463 --- shell/shell.cpp | 11 ++++++----- shell/shell.h | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/shell/shell.cpp b/shell/shell.cpp index dea716cbb..154d345a8 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -20,6 +20,7 @@ #include "shell.h" // qt/kde includes +#include #include #include #include @@ -95,11 +96,6 @@ void Shell::init() readSettings(); - if (!KGlobal::config()->hasGroup("MainWindow")) - { - showMaximized(); - } - if (m_args && m_args->isSet("unique") && m_args->count() == 1) { QDBusConnection::sessionBus().registerService("org.kde.okular"); @@ -315,4 +311,9 @@ void Shell::slotShowMenubar() menuBar()->hide(); } +QSize Shell::sizeHint() const +{ + return QApplication::desktop()->availableGeometry( this ).size() * 0.75; +} + #include "shell.moc" diff --git a/shell/shell.h b/shell/shell.h index 8afb03d78..fe4278dbf 100644 --- a/shell/shell.h +++ b/shell/shell.h @@ -47,6 +47,8 @@ public: * Default Destructor */ virtual ~Shell(); + + QSize sizeHint() const; public slots: void slotQuit();