Commit 806c4c07 authored by Tigran Gabrielyan's avatar Tigran Gabrielyan Committed by Nate Graham

Fixed initial size and content width of Activity Settings KCM

Summary:
Tab contents are added when KActivities::Consumer::serviceStatusChanged signal is fired which happens after the layout is set. This causes the window to be too small initially so a minimumSize is set manually.

This change also adjusts the column span to 2 for rows with a single checkbox. The contents of third column would be pushed outside the scroll area on rows where column 1 is the label and column 2 are the controls since the width of checkboxes in column 1 is too wide.

BUG: 398793
FIXED-IN: 5.16.0

Reviewers: #plasma, broulik, ngraham

Reviewed By: ngraham

Subscribers: ngraham, broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D20055
parent 22d725ca
......@@ -69,7 +69,6 @@ ActivityPage::ActivityPage(QWidget *parent, const QVariantList &args)
setAboutData(about);*/
// Build the UI
m_tabWidget = new QTabWidget();
QVBoxLayout *lay = new QVBoxLayout();
// Message widget
......@@ -78,6 +77,10 @@ ActivityPage::ActivityPage(QWidget *parent, const QVariantList &args)
m_messageWidget->setMessageType(KMessageWidget::Warning);
m_messageWidget->hide();
// Tab widget (must set size here since tabs are loaded after initial layout size is calculated)
m_tabWidget = new QTabWidget();
m_tabWidget->setMinimumSize(676, 474);
lay->addWidget(m_messageWidget);
lay->addWidget(m_tabWidget);
setLayout(lay);
......
......@@ -60,16 +60,14 @@ void ActionConfigWidget::addWidgets(QList<QPair<QString, QWidget*> > configMap)
// allow left-aligning checkboxes without treating them as section header
} else if (line.first == QLatin1String("NONE")) {
m_gridLayout->addItem(new QSpacerItem(50 ,3), row, 0);
m_gridLayout->addWidget(line.second, row, 1, Qt::AlignRight);
//m_gridLayout->addWidget(line.second, row, 1, 2, 1, Qt::AlignRight);
m_gridLayout->addItem(new QSpacerItem(50, 3), row, 0);
m_gridLayout->addWidget(line.second, row, 1, 1, 2);
} else {
// connect enabled / disabled
QLabel* label = new QLabel(this);
label->setText(line.first);
m_gridLayout->addItem(new QSpacerItem(50 ,3), row, 0);
m_gridLayout->addItem(new QSpacerItem(50, 3), row, 0);
m_gridLayout->addWidget(label, row, 1, Qt::AlignRight);
m_gridLayout->addWidget(line.second, row, 2);
......
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