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
This commit is contained in:
Pino Toscano 2009-01-17 13:39:21 +00:00
parent 7d1af81f37
commit 03e8a1bc7e
2 changed files with 8 additions and 5 deletions

View file

@ -20,6 +20,7 @@
#include "shell.h"
// qt/kde includes
#include <qdesktopwidget.h>
#include <qtimer.h>
#include <QtDBus/qdbusconnection.h>
#include <kaction.h>
@ -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"

View file

@ -47,6 +47,8 @@ public:
* Default Destructor
*/
virtual ~Shell();
QSize sizeHint() const;
public slots:
void slotQuit();