diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index b3ad3dd204a..e8619922e00 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -33,6 +33,9 @@ #include "helpmanager.h" #include "openpagesmanager.h" +#include +#include + #include #include #include @@ -423,19 +426,27 @@ void BookmarkWidget::setup(bool showButtons) regExp.setCaseSensitivity(Qt::CaseInsensitive); QLayout *vlayout = new QVBoxLayout(this); - vlayout->setMargin(4); + vlayout->setMargin(0); + vlayout->setSpacing(0); - QLabel *label = new QLabel(tr("Filter:"), this); - vlayout->addWidget(label); - - searchField = new QLineEdit(this); + searchField = new Utils::FilterLineEdit(this); setFocusProxy(searchField); + + Utils::StyledBar *toolbar = new Utils::StyledBar(this); + toolbar->setSingleRow(false); + QLayout *tbLayout = new QHBoxLayout(); + tbLayout->setMargin(4); + tbLayout->addWidget(searchField); + toolbar->setLayout(tbLayout); + + vlayout->addWidget(toolbar); + searchField->installEventFilter(this); - vlayout->addWidget(searchField); connect(searchField, SIGNAL(textChanged(const QString &)), this, SLOT(filterChanged())); treeView = new TreeView(this); + treeView->setFrameStyle(QFrame::NoFrame); vlayout->addWidget(treeView); #ifdef Q_OS_MAC diff --git a/src/shared/help/contentwindow.cpp b/src/shared/help/contentwindow.cpp index e728a9a7478..a8ed1f1613a 100644 --- a/src/shared/help/contentwindow.cpp +++ b/src/shared/help/contentwindow.cpp @@ -52,7 +52,7 @@ ContentWindow::ContentWindow() setFocusProxy(m_contentWidget); QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(4); + layout->setMargin(0); layout->addWidget(m_contentWidget); connect(m_contentWidget, SIGNAL(customContextMenuRequested(QPoint)), this, @@ -63,6 +63,8 @@ ContentWindow::ContentWindow() QHelpContentModel *contentModel = qobject_cast(m_contentWidget->model()); connect(contentModel, SIGNAL(contentsCreated()), this, SLOT(expandTOC())); + + m_contentWidget->setFrameStyle(QFrame::NoFrame); } ContentWindow::~ContentWindow() diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp index 0b9bf0935f0..1bc86d60ecf 100644 --- a/src/shared/help/indexwindow.cpp +++ b/src/shared/help/indexwindow.cpp @@ -34,6 +34,9 @@ #include "openpagesmanager.h" #include "topicchooser.h" +#include +#include + #include #include #include @@ -41,6 +44,7 @@ #include #include #include +#include #include #include @@ -52,17 +56,29 @@ IndexWindow::IndexWindow() , m_indexWidget(0) { QVBoxLayout *layout = new QVBoxLayout(this); - QLabel *l = new QLabel(tr("&Look for:")); - layout->addWidget(l); - m_searchLineEdit = new QLineEdit(); - l->setBuddy(m_searchLineEdit); + m_searchLineEdit = new Utils::FilterLineEdit(); + m_searchLineEdit->setPlaceholderText(QString()); setFocusProxy(m_searchLineEdit); connect(m_searchLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterIndices(QString))); m_searchLineEdit->installEventFilter(this); - layout->setMargin(4); - layout->addWidget(m_searchLineEdit); + + QLabel *l = new QLabel(tr("&Look for:")); + l->setBuddy(m_searchLineEdit); + layout->addWidget(l); + layout->setMargin(0); + layout->setSpacing(0); + + Utils::StyledBar *toolbar = new Utils::StyledBar(this); + toolbar->setSingleRow(false); + QLayout *tbLayout = new QHBoxLayout(); + tbLayout->setSpacing(6); + tbLayout->setMargin(4); + tbLayout->addWidget(l); + tbLayout->addWidget(m_searchLineEdit); + toolbar->setLayout(tbLayout); + layout->addWidget(toolbar); QHelpEngine *engine = &Help::HelpManager::helpEngine(); m_indexWidget = engine->indexWidget(); @@ -77,6 +93,7 @@ IndexWindow::IndexWindow() this, SIGNAL(linksActivated(QMap, QString))); connect(m_searchLineEdit, SIGNAL(returnPressed()), m_indexWidget, SLOT(activateCurrentItem())); + m_indexWidget->setFrameStyle(QFrame::NoFrame); layout->addWidget(m_indexWidget); m_indexWidget->viewport()->installEventFilter(this);