Commit 943140d3 authored by Kishore Gopalakrishnan's avatar Kishore Gopalakrishnan Committed by Nate Graham

Allow 'Exclude folders' section in Baloo KCM to fill window

Summary:
Initially, there was a spacer which took up a significant amount of space at the bottom of the window without any apprent justification.

I removed a spacer to allow the folder list to occupy the available space.

It seems like it was added intentionally, so I'm not sure if removing it breaks something. I couldn't find any broken behaviour with this change.

BUG: 407709

Test Plan:
1. Open kcm_baloofile. Check if the exclude folders section fills all available space.
2. Resize the window to make it larger. Check that the exclude folders section resizes to match the window.
3. Open the KCM standalone to and try to resize it smaller than the default size to check if the sizehint is set properly.

Reviewers: #baloo, #vdg, ngraham

Subscribers: GB_2, abetts, bruns, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21414
parent aed7f597
......@@ -47,33 +47,48 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="m_excludeFolders_GB">
<property name="title">
<string>Do not search in these locations</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="FolderSelectionWidget" name="m_excludeFolders_FSW" native="true"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="bottomSpacer">
<spacer name="middleSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>66</height>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="5">
<item>
<widget class="QLabel" name="m_excludeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Do not search in these locations:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="FolderSelectionWidget" name="m_excludeFolders_FSW" native="true"/>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
......
......@@ -50,8 +50,6 @@ FolderSelectionWidget::FolderSelectionWidget(QWidget* parent, Qt::WindowFlags f)
layout->addWidget(m_listWidget);
QHBoxLayout* hLayout = new QHBoxLayout;
QSpacerItem* spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
hLayout->addItem(spacer);
m_addButton = new QPushButton(this);
m_addButton->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
......@@ -66,6 +64,10 @@ FolderSelectionWidget::FolderSelectionWidget(QWidget* parent, Qt::WindowFlags f)
hLayout->addWidget(m_addButton);
hLayout->addWidget(m_removeButton);
QSpacerItem* spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
hLayout->addItem(spacer);
layout->addItem(hLayout);
}
......
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