mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Move search and filter bar close buttons to the right
Summary: Close buttons for windows, tabs, and pretty much everything else in KDE are on the right, not the left. This patch makes Dolphin's search and filter bars follow that. BUG: 421372 FIXED-IN: 20.08.0 Test Plan: {F8314176} Reviewers: abetts, #dolphin, #vdg, elvisangelaccio, GB_2 Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2 Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29693
This commit is contained in:
parent
a058c64eba
commit
1ee665bac8
|
@ -32,13 +32,6 @@
|
|||
FilterBar::FilterBar(QWidget* parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
// Create close button
|
||||
QToolButton *closeButton = new QToolButton(this);
|
||||
closeButton->setAutoRaise(true);
|
||||
closeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
|
||||
closeButton->setToolTip(i18nc("@info:tooltip", "Hide Filter Bar"));
|
||||
connect(closeButton, &QToolButton::clicked, this, &FilterBar::closeRequest);
|
||||
|
||||
// Create button to lock text when changing folders
|
||||
m_lockButton = new QToolButton(this);
|
||||
m_lockButton->setAutoRaise(true);
|
||||
|
@ -57,12 +50,19 @@ FilterBar::FilterBar(QWidget* parent) :
|
|||
this, &FilterBar::filterChanged);
|
||||
setFocusProxy(m_filterInput);
|
||||
|
||||
// Create close button
|
||||
QToolButton *closeButton = new QToolButton(this);
|
||||
closeButton->setAutoRaise(true);
|
||||
closeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
|
||||
closeButton->setToolTip(i18nc("@info:tooltip", "Hide Filter Bar"));
|
||||
connect(closeButton, &QToolButton::clicked, this, &FilterBar::closeRequest);
|
||||
|
||||
// Apply layout
|
||||
QHBoxLayout* hLayout = new QHBoxLayout(this);
|
||||
hLayout->setContentsMargins(0, 0, 0, 0);
|
||||
hLayout->addWidget(closeButton);
|
||||
hLayout->addWidget(m_lockButton);
|
||||
hLayout->addWidget(m_filterInput);
|
||||
hLayout->addWidget(closeButton);
|
||||
}
|
||||
|
||||
FilterBar::~FilterBar()
|
||||
|
|
|
@ -344,13 +344,6 @@ void DolphinSearchBox::saveSettings()
|
|||
|
||||
void DolphinSearchBox::init()
|
||||
{
|
||||
// Create close button
|
||||
QToolButton* closeButton = new QToolButton(this);
|
||||
closeButton->setAutoRaise(true);
|
||||
closeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
|
||||
closeButton->setToolTip(i18nc("@info:tooltip", "Quit searching"));
|
||||
connect(closeButton, &QToolButton::clicked, this, &DolphinSearchBox::emitCloseRequest);
|
||||
|
||||
// Create search box
|
||||
m_searchInput = new QLineEdit(this);
|
||||
m_searchInput->setPlaceholderText(i18n("Search..."));
|
||||
|
@ -371,11 +364,18 @@ void DolphinSearchBox::init()
|
|||
m_searchInput->addAction(m_saveSearchAction, QLineEdit::TrailingPosition);
|
||||
connect(m_saveSearchAction, &QAction::triggered, this, &DolphinSearchBox::slotSearchSaved);
|
||||
|
||||
// Create close button
|
||||
QToolButton* closeButton = new QToolButton(this);
|
||||
closeButton->setAutoRaise(true);
|
||||
closeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
|
||||
closeButton->setToolTip(i18nc("@info:tooltip", "Quit searching"));
|
||||
connect(closeButton, &QToolButton::clicked, this, &DolphinSearchBox::emitCloseRequest);
|
||||
|
||||
// Apply layout for the search input
|
||||
QHBoxLayout* searchInputLayout = new QHBoxLayout();
|
||||
searchInputLayout->setContentsMargins(0, 0, 0, 0);
|
||||
searchInputLayout->addWidget(closeButton);
|
||||
searchInputLayout->addWidget(m_searchInput);
|
||||
searchInputLayout->addWidget(closeButton);
|
||||
|
||||
// Create "Filename" and "Content" button
|
||||
m_fileNameButton = new QToolButton(this);
|
||||
|
|
Loading…
Reference in a new issue