Summary:
Reduce the spacing between widgets and remove the content margins on the extended search options to have a more compact and space-saving layout.
Currently, some widgets are not even aligned.
This will be even more important if we remove the toggle button for 'More Options'.
CCBUG: 386754
Test Plan:
BEFORE: {
F7681182}
AFTER: {
F7681184}
Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg
Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25028
* TODO: Move this somewhere global to all KDE apps, not just Dolphin
*/
const int VERTICAL_SPACER_HEIGHT = 18;
* TODO: Move this somewhere global to all KDE apps, not just Dolphin
*/
const int VERTICAL_SPACER_HEIGHT = 18;
+ const int LAYOUT_SPACING_SMALL = 2;
initComboBox(m_ratingSelector);
QHBoxLayout* topLayout = new QHBoxLayout(this);
initComboBox(m_ratingSelector);
QHBoxLayout* topLayout = new QHBoxLayout(this);
+ topLayout->setContentsMargins(0, 0, 0, 0);
topLayout->addWidget(m_typeSelector);
topLayout->addWidget(m_dateSelector);
topLayout->addWidget(m_ratingSelector);
topLayout->addWidget(m_typeSelector);
topLayout->addWidget(m_dateSelector);
topLayout->addWidget(m_ratingSelector);
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
* **************************************************************************/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
* **************************************************************************/
#include "dolphinsearchbox.h"
#include "dolphin_searchsettings.h"
#include "dolphinsearchbox.h"
#include "dolphin_searchsettings.h"
m_facetsWidget = new DolphinFacetsWidget(this);
m_facetsWidget->installEventFilter(this);
m_facetsWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_facetsWidget = new DolphinFacetsWidget(this);
m_facetsWidget->installEventFilter(this);
m_facetsWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
+ m_facetsWidget->layout()->setSpacing(Dolphin::LAYOUT_SPACING_SMALL);
connect(m_facetsWidget, &DolphinFacetsWidget::facetChanged, this, &DolphinSearchBox::slotFacetChanged);
// Apply layout for the options
QHBoxLayout* optionsLayout = new QHBoxLayout();
optionsLayout->setContentsMargins(0, 0, 0, 0);
connect(m_facetsWidget, &DolphinFacetsWidget::facetChanged, this, &DolphinSearchBox::slotFacetChanged);
// Apply layout for the options
QHBoxLayout* optionsLayout = new QHBoxLayout();
optionsLayout->setContentsMargins(0, 0, 0, 0);
+ optionsLayout->setSpacing(Dolphin::LAYOUT_SPACING_SMALL);
optionsLayout->addWidget(m_fileNameButton);
optionsLayout->addWidget(m_contentButton);
optionsLayout->addWidget(m_separator);
optionsLayout->addWidget(m_fileNameButton);
optionsLayout->addWidget(m_contentButton);
optionsLayout->addWidget(m_separator);
m_topLayout = new QVBoxLayout(this);
m_topLayout->setContentsMargins(0, 0, 0, 0);
m_topLayout = new QVBoxLayout(this);
m_topLayout->setContentsMargins(0, 0, 0, 0);
+ m_topLayout->setSpacing(Dolphin::LAYOUT_SPACING_SMALL);
m_topLayout->addLayout(searchInputLayout);
m_topLayout->addWidget(m_optionsScrollArea);
m_topLayout->addWidget(m_facetsWidget);
m_topLayout->addLayout(searchInputLayout);
m_topLayout->addWidget(m_optionsScrollArea);
m_topLayout->addWidget(m_facetsWidget);