Fix project settings vertical scrollbar on open

Differential Revision: https://phabricator.kde.org/D10449
parent 213e6433
......@@ -38,7 +38,7 @@ ProfileWidget::ProfileWidget(QWidget *parent) :
QWidget(parent)
{
m_originalProfile = QStringLiteral("invalid");
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
QVBoxLayout *lay = new QVBoxLayout;
QHBoxLayout *labelLay = new QHBoxLayout;
......@@ -88,18 +88,18 @@ ProfileWidget::ProfileWidget(QWidget *parent) :
slotChangeSelection(current, old);
});
profileSplitter->addWidget(m_treeView);
m_treeView->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_treeView->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
m_descriptionPanel = new QTextEdit(this);
m_descriptionPanel->setReadOnly(true);
m_descriptionPanel->viewport()->setCursor(Qt::ArrowCursor);
m_descriptionPanel->viewport()->setBackgroundRole(QPalette::Mid);
m_descriptionPanel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
m_descriptionPanel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
m_descriptionPanel->setFrameStyle(QFrame::NoFrame);
profileSplitter->addWidget(m_descriptionPanel);
lay->addWidget(profileSplitter);
profileSplitter->setStretchFactor(0, 2);
profileSplitter->setStretchFactor(1, 1);
profileSplitter->setStretchFactor(0, 4);
profileSplitter->setStretchFactor(1, 3);
auto all_fps = ProfileRepository::get()->getAllFps();
QLocale locale;
......
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