diff options
| author | Peter Penz <[email protected]> | 2011-07-07 11:49:51 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-07-07 11:49:51 +0200 |
| commit | 61da3d924cecdbea4efa4fc70e461e5273fd5b08 (patch) | |
| tree | 59a63ca23f4727701147a7b3e47f70f061d6e685 /src/search/dolphinsearchbox.cpp | |
| parent | 2da111408f8141d0759b9a70a50690b2c512551e (diff) | |
Use QToolButtons instead of QPushButtons for the searchbar
Thanks to Hugo Pereira Da Costa for the patch.
BUG: 277227
FIXED-IN: 4.7.0
Diffstat (limited to 'src/search/dolphinsearchbox.cpp')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 803f0056e..0bad32fe8 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -34,7 +34,7 @@ #include <QHBoxLayout> #include <QKeyEvent> #include <QLabel> -#include <QPushButton> +#include <QToolButton> #include <QScrollArea> #include <QTimer> #include <QToolButton> @@ -229,10 +229,10 @@ void DolphinSearchBox::slotReturnPressed(const QString& text) emit returnPressed(text); } -void DolphinSearchBox::initButton(QPushButton* button) +void DolphinSearchBox::initButton(QToolButton* button) { button->setAutoExclusive(true); - button->setFlat(true); + button->setAutoRaise(true); button->setCheckable(true); connect(button, SIGNAL(clicked(bool)), this, SLOT(slotConfigurationChanged())); } @@ -289,11 +289,11 @@ void DolphinSearchBox::init() searchInputLayout->addWidget(m_searchInput); // Create "Filename" and "Content" button - m_fileNameButton = new QPushButton(this); + m_fileNameButton = new QToolButton(this); m_fileNameButton->setText(i18nc("action:button", "Filename")); initButton(m_fileNameButton); - m_contentButton = new QPushButton(); + m_contentButton = new QToolButton(); m_contentButton->setText(i18nc("action:button", "Content")); initButton(m_contentButton);; @@ -306,11 +306,11 @@ void DolphinSearchBox::init() m_separator = new KSeparator(Qt::Vertical, this); // Create "From Here" and "Everywhere"button - m_fromHereButton = new QPushButton(this); + m_fromHereButton = new QToolButton(this); m_fromHereButton->setText(i18nc("action:button", "From Here")); initButton(m_fromHereButton); - m_everywhereButton = new QPushButton(this); + m_everywhereButton = new QToolButton(this); m_everywhereButton->setText(i18nc("action:button", "Everywhere")); initButton(m_everywhereButton); |
