Make window and column sizes absolute

The relative sizes were too unpredictable and made for some
weird sizes. Better just to have a default layout.
parent 4ba02009
......@@ -342,8 +342,7 @@ MainWindow::Private::~Private() {}
MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags)
: KXmlGuiWindow(parent, flags), d(new Private(this))
{
const auto desk = QApplication::desktop()->screenGeometry(this);
resize(desk.width() / 2, desk.height() / 3);
resize(960, 440);
}
MainWindow::~MainWindow() {}
......
......@@ -214,13 +214,12 @@ void KeyTreeView::init()
m_view->setModel(rearangingModel);
std::vector<int> defaultSizes;
int unit = fontMetrics().averageCharWidth();
defaultSizes.push_back(unit * 40);
defaultSizes.push_back(unit * 40);
defaultSizes.push_back(unit * 10);
defaultSizes.push_back(unit * 10);
defaultSizes.push_back(unit * 10);
defaultSizes.push_back(unit * 10);
defaultSizes.push_back(280);
defaultSizes.push_back(280);
defaultSizes.push_back(100);
defaultSizes.push_back(100);
defaultSizes.push_back(80);
defaultSizes.push_back(80);
setColumnSizes(defaultSizes);
}
......
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