Commit ad04f9bc authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

ensure some proper initial size

ensure we start with some usable window size even
if there is no stored data about it

raise initial size to 800x600 or 0.6 of available screen
size

ensure we cut it with the maximal available screen size

BUG: 450686
parent 2ec2e907
Pipeline #145671 passed with stage
in 3 minutes and 55 seconds
......@@ -62,6 +62,7 @@
#include <QMenuBar>
#include <QMimeData>
#include <QMimeDatabase>
#include <QScreen>
#include <QStyle>
#include <QTimer>
#include <QToolButton>
......@@ -202,10 +203,8 @@ KateMainWindow::~KateMainWindow()
QSize KateMainWindow::sizeHint() const
{
/**
* have some useful size hint, else we have mini windows per default
*/
return (QSize(640, 480).expandedTo(minimumSizeHint()));
// ensure some proper sizing per default
return (QSize(800, 600).expandedTo(minimumSizeHint())).expandedTo(screen()->availableSize() * 0.6).boundedTo(screen()->availableSize());
}
void KateMainWindow::setupImportantActions()
......
......@@ -40,6 +40,7 @@
#include <QLabel>
#include <QMenuBar>
#include <QMimeData>
#include <QScreen>
#include <QTextCodec>
#include <QTimer>
......@@ -118,10 +119,8 @@ KWrite::~KWrite()
QSize KWrite::sizeHint() const
{
/**
* have some useful size hint, else we have mini windows per default
*/
return (QSize(640, 480).expandedTo(minimumSizeHint()));
// ensure some proper sizing per default
return (QSize(800, 600).expandedTo(minimumSizeHint())).expandedTo(screen()->availableSize() * 0.6).boundedTo(screen()->availableSize());
}
void KWrite::setupActions()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment