From 9f1c8ef4975ad21847883e0dece4e24a6b52a28a Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Tue, 7 May 2024 12:30:09 -0400 Subject: [PATCH 1/6] Refactor SearchBar to QToolBar SearchBar becomes QToolBar instead of QLineEdit. The previous LineEdit is now a child of SearchBar --- src/kiwixapp.cpp | 10 +++++----- src/mainwindow.cpp | 2 +- src/searchbar.cpp | 32 +++++++++++++++++++++----------- src/searchbar.h | 18 ++++++++++++++++-- 4 files changed, 43 insertions(+), 19 deletions(-) diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index b146be0..a8f9863 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -144,11 +144,11 @@ KiwixApp::~KiwixApp() void KiwixApp::newTab() { getTabWidget()->createNewTab(true, false); - auto& searchBar = mp_mainWindow->getTopWidget()->getSearchBar(); - searchBar.setFocus(Qt::MouseFocusReason); - searchBar.clear(); - searchBar.clearSuggestions(); - searchBar.hideSuggestions(); + auto& searchBarLineEdit = mp_mainWindow->getTopWidget()->getSearchBar().getLineEdit(); + searchBarLineEdit.setFocus(Qt::MouseFocusReason); + searchBarLineEdit.clear(); + searchBarLineEdit.clearSuggestions(); + searchBarLineEdit.hideSuggestions(); } QString KiwixApp::findLibraryDirectory() diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index df3b863..c980c32 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -61,7 +61,7 @@ MainWindow::MainWindow(QWidget *parent) : }); connect(mp_ui->tabBar, &TabBar::currentTitleChanged, - &(mp_ui->mainToolBar->getSearchBar()), &SearchBar::on_currentTitleChanged); + &(mp_ui->mainToolBar->getSearchBar()), &SearchBar::currentTitleChanged); // This signal emited more often than the history really updated // but for now we have no better signal for it. diff --git a/src/searchbar.cpp b/src/searchbar.cpp index 2f0d021..b4e582e 100644 --- a/src/searchbar.cpp +++ b/src/searchbar.cpp @@ -59,7 +59,7 @@ void SearchButton::on_buttonClicked() library->save(); } -SearchBar::SearchBar(QWidget *parent) : +SearchBarLineEdit::SearchBarLineEdit(QWidget *parent) : QLineEdit(parent), m_completer(&m_completionModel, this), m_button(this) @@ -76,7 +76,7 @@ SearchBar::SearchBar(QWidget *parent) : m_completer.popup()->setStyleSheet(KiwixApp::instance()->parseStyleFromFile(":/css/popup.css")); qRegisterMetaType>("QVector"); - connect(mp_typingTimer, &QTimer::timeout, this, &SearchBar::updateCompletion); + connect(mp_typingTimer, &QTimer::timeout, this, &SearchBarLineEdit::updateCompletion); connect(this, &QLineEdit::textEdited, this, [=](const QString &text) { @@ -103,19 +103,19 @@ SearchBar::SearchBar(QWidget *parent) : }); } -void SearchBar::hideSuggestions() +void SearchBarLineEdit::hideSuggestions() { m_completer.popup()->hide(); } -void SearchBar::clearSuggestions() +void SearchBarLineEdit::clearSuggestions() { QStringList empty; m_completionModel.setStringList(empty); m_urlList.clear(); } -void SearchBar::on_currentTitleChanged(const QString& title) +void SearchBarLineEdit::on_currentTitleChanged(const QString& title) { if (this->hasFocus()) { return; @@ -129,7 +129,7 @@ void SearchBar::on_currentTitleChanged(const QString& title) m_title = title; } -void SearchBar::focusInEvent( QFocusEvent* event) +void SearchBarLineEdit::focusInEvent( QFocusEvent* event) { setReadOnly(false); if (event->reason() == Qt::MouseFocusReason && text() == m_title) { @@ -139,13 +139,13 @@ void SearchBar::focusInEvent( QFocusEvent* event) event->reason() == Qt::MouseFocusReason || event->reason() == Qt::ShortcutFocusReason) { connect(&m_completer, QOverload::of(&QCompleter::activated), - this, QOverload::of(&SearchBar::openCompletion)); + this, QOverload::of(&SearchBarLineEdit::openCompletion)); } QLineEdit::focusInEvent(event); m_button.set_searchMode(true); } -void SearchBar::focusOutEvent(QFocusEvent* event) +void SearchBarLineEdit::focusOutEvent(QFocusEvent* event) { setReadOnly(true); if (event->reason() == Qt::MouseFocusReason && text().isEmpty()) { @@ -156,7 +156,7 @@ void SearchBar::focusOutEvent(QFocusEvent* event) return QLineEdit::focusOutEvent(event); } -void SearchBar::updateCompletion() +void SearchBarLineEdit::updateCompletion() { mp_typingTimer->stop(); clearSuggestions(); @@ -184,14 +184,14 @@ void SearchBar::updateCompletion() suggestionWorker->start(); } -void SearchBar::openCompletion(const QModelIndex &index) +void SearchBarLineEdit::openCompletion(const QModelIndex &index) { if (m_urlList.size() != 0) { openCompletion(index.data().toString(), index.row()); } } -void SearchBar::openCompletion(const QString& text, int index) +void SearchBarLineEdit::openCompletion(const QString& text, int index) { QUrl url; if (this->text().compare(text, Qt::CaseInsensitive) == 0) { @@ -201,3 +201,13 @@ void SearchBar::openCompletion(const QString& text, int index) } QTimer::singleShot(0, [=](){KiwixApp::instance()->openUrl(url, false);}); } + +SearchBar::SearchBar(QWidget *parent) : + QToolBar(parent), + m_searchBarLineEdit(this) +{ + addWidget(&m_searchBarLineEdit); + + connect(this, &SearchBar::currentTitleChanged, &m_searchBarLineEdit, + &SearchBarLineEdit::on_currentTitleChanged); +} diff --git a/src/searchbar.h b/src/searchbar.h index 378200a..a06ca74 100644 --- a/src/searchbar.h +++ b/src/searchbar.h @@ -9,6 +9,7 @@ #include #include #include +#include class SearchButton : public QPushButton { Q_OBJECT @@ -23,11 +24,11 @@ protected: bool m_searchMode; }; -class SearchBar : public QLineEdit +class SearchBarLineEdit : public QLineEdit { Q_OBJECT public: - SearchBar(QWidget *parent = nullptr); + SearchBarLineEdit(QWidget *parent = nullptr); void hideSuggestions(); public slots: @@ -54,4 +55,17 @@ private slots: void openCompletion(const QString& text, int index); }; + +class SearchBar : public QToolBar { + Q_OBJECT +public: + SearchBar(QWidget *parent = nullptr); + SearchBarLineEdit& getLineEdit() { return m_searchBarLineEdit; }; + +signals: + void currentTitleChanged(const QString &title); + +private: + SearchBarLineEdit m_searchBarLineEdit; +}; #endif // SEARCHBAR_H From ea0a682af9129ff615b99c5ed9f5c4662f363a16 Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Tue, 7 May 2024 12:40:56 -0400 Subject: [PATCH 2/6] Seperate QLabel from SearchButton to SearchBar Since we will be seperate search icon from bookmark button, we remove the logic in SearchButton and simply put an equivalent QLabel in SearchBar. --- src/searchbar.cpp | 40 ++++++++++++++++------------------------ src/searchbar.h | 5 +---- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/src/searchbar.cpp b/src/searchbar.cpp index b4e582e..066aae7 100644 --- a/src/searchbar.cpp +++ b/src/searchbar.cpp @@ -7,38 +7,27 @@ #include "suggestionlistworker.h" SearchButton::SearchButton(QWidget *parent) : - QPushButton(parent), - m_searchMode(true) + QPushButton(parent) { setFlat(true); - setIcon(QIcon(":/icons/search.svg")); connect(this, &QPushButton::clicked, this, &SearchButton::on_buttonClicked); } -void SearchButton::set_searchMode(bool searchMode) +void SearchButton::update_display() { - m_searchMode = searchMode; - if (m_searchMode) { - setIcon(QIcon(":/icons/search.svg")); - setIconSize(QSize(27, 27)); + auto kiwixApp = KiwixApp::instance(); + if (kiwixApp->isCurrentArticleBookmarked()) { + setIcon(QIcon(":/icons/star-active.svg")); + setToolTip(gt("remove-bookmark")); } else { - auto kiwixApp = KiwixApp::instance(); - if (kiwixApp->isCurrentArticleBookmarked()) { - setIcon(QIcon(":/icons/star-active.svg")); - setToolTip(gt("remove-bookmark")); - } else { - setIcon(QIcon(":/icons/star.svg")); - setToolTip(gt("add-bookmark")); - } - setIconSize(QSize(32, 32)); + setIcon(QIcon(":/icons/star.svg")); + setToolTip(gt("add-bookmark")); } + setIconSize(QSize(32, 32)); } void SearchButton::on_buttonClicked() { - if (m_searchMode) - return; - auto kiwixApp = KiwixApp::instance(); auto library = kiwixApp->getLibrary(); auto tabWidget = kiwixApp->getTabWidget(); @@ -55,7 +44,7 @@ void SearchButton::on_buttonClicked() bookmark.setTitle(tabWidget->currentArticleTitle().toStdString()); library->addBookmark(bookmark); } - set_searchMode(false); + update_display(); library->save(); } @@ -117,6 +106,7 @@ void SearchBarLineEdit::clearSuggestions() void SearchBarLineEdit::on_currentTitleChanged(const QString& title) { + m_button.update_display(); if (this->hasFocus()) { return; } @@ -125,7 +115,6 @@ void SearchBarLineEdit::on_currentTitleChanged(const QString& title) } else { setText(""); } - m_button.set_searchMode(title.isEmpty()); m_title = title; } @@ -142,14 +131,12 @@ void SearchBarLineEdit::focusInEvent( QFocusEvent* event) this, QOverload::of(&SearchBarLineEdit::openCompletion)); } QLineEdit::focusInEvent(event); - m_button.set_searchMode(true); } void SearchBarLineEdit::focusOutEvent(QFocusEvent* event) { setReadOnly(true); if (event->reason() == Qt::MouseFocusReason && text().isEmpty()) { - m_button.set_searchMode(false); setText(m_title); } deselect(); @@ -206,6 +193,11 @@ SearchBar::SearchBar(QWidget *parent) : QToolBar(parent), m_searchBarLineEdit(this) { + QLabel* searchIconLabel = new QLabel; + searchIconLabel->setObjectName("searchIcon"); + searchIconLabel->setPixmap(QIcon(":/icons/search.svg").pixmap(QSize(27, 27))); + + addWidget(searchIconLabel); addWidget(&m_searchBarLineEdit); connect(this, &SearchBar::currentTitleChanged, &m_searchBarLineEdit, diff --git a/src/searchbar.h b/src/searchbar.h index a06ca74..91582b7 100644 --- a/src/searchbar.h +++ b/src/searchbar.h @@ -17,11 +17,8 @@ public: SearchButton(QWidget *parent = nullptr); public slots: - void set_searchMode(bool searchMode); + void update_display(); void on_buttonClicked(); - -protected: - bool m_searchMode; }; class SearchBarLineEdit : public QLineEdit From c4c3367c7808297ef8238c988f4e76af9cb9197f Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Tue, 7 May 2024 12:55:30 -0400 Subject: [PATCH 3/6] Seperate SearchButton (now BookmarkButton)from LineEdit Renamed SearchButton to BookmarkButton since it no longer has the search icon. Moved BookmarkButton to the right side of SearchBar --- src/searchbar.cpp | 23 +++++++++++++---------- src/searchbar.h | 6 +++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/searchbar.cpp b/src/searchbar.cpp index 066aae7..50f4aed 100644 --- a/src/searchbar.cpp +++ b/src/searchbar.cpp @@ -6,14 +6,14 @@ #include "kiwixapp.h" #include "suggestionlistworker.h" -SearchButton::SearchButton(QWidget *parent) : +BookmarkButton::BookmarkButton(QWidget *parent) : QPushButton(parent) { - setFlat(true); - connect(this, &QPushButton::clicked, this, &SearchButton::on_buttonClicked); + connect(this, &QPushButton::clicked, this, &BookmarkButton::on_buttonClicked); + connect(this, &QPushButton::clicked, this, &BookmarkButton::update_display); } -void SearchButton::update_display() +void BookmarkButton::update_display() { auto kiwixApp = KiwixApp::instance(); if (kiwixApp->isCurrentArticleBookmarked()) { @@ -26,7 +26,7 @@ void SearchButton::update_display() setIconSize(QSize(32, 32)); } -void SearchButton::on_buttonClicked() +void BookmarkButton::on_buttonClicked() { auto kiwixApp = KiwixApp::instance(); auto library = kiwixApp->getLibrary(); @@ -44,14 +44,12 @@ void SearchButton::on_buttonClicked() bookmark.setTitle(tabWidget->currentArticleTitle().toStdString()); library->addBookmark(bookmark); } - update_display(); library->save(); } SearchBarLineEdit::SearchBarLineEdit(QWidget *parent) : QLineEdit(parent), - m_completer(&m_completionModel, this), - m_button(this) + m_completer(&m_completionModel, this) { mp_typingTimer = new QTimer(this); mp_typingTimer->setSingleShot(true); @@ -106,7 +104,6 @@ void SearchBarLineEdit::clearSuggestions() void SearchBarLineEdit::on_currentTitleChanged(const QString& title) { - m_button.update_display(); if (this->hasFocus()) { return; } @@ -191,15 +188,21 @@ void SearchBarLineEdit::openCompletion(const QString& text, int index) SearchBar::SearchBar(QWidget *parent) : QToolBar(parent), - m_searchBarLineEdit(this) + m_searchBarLineEdit(this), + m_bookmarkButton(this) { QLabel* searchIconLabel = new QLabel; searchIconLabel->setObjectName("searchIcon"); searchIconLabel->setPixmap(QIcon(":/icons/search.svg").pixmap(QSize(27, 27))); + setIconSize(QSize(32, 32)); + addWidget(searchIconLabel); addWidget(&m_searchBarLineEdit); + addWidget(&m_bookmarkButton); connect(this, &SearchBar::currentTitleChanged, &m_searchBarLineEdit, &SearchBarLineEdit::on_currentTitleChanged); + connect(this, &SearchBar::currentTitleChanged, &m_bookmarkButton, + &BookmarkButton::update_display); } diff --git a/src/searchbar.h b/src/searchbar.h index 91582b7..5a145ba 100644 --- a/src/searchbar.h +++ b/src/searchbar.h @@ -11,10 +11,10 @@ #include #include -class SearchButton : public QPushButton { +class BookmarkButton : public QPushButton { Q_OBJECT public: - SearchButton(QWidget *parent = nullptr); + BookmarkButton(QWidget *parent = nullptr); public slots: void update_display(); @@ -39,7 +39,6 @@ private: QStringListModel m_completionModel; QCompleter m_completer; QVector m_urlList; - SearchButton m_button; QString m_title; QString m_searchbarInput; bool m_returnPressed = false; @@ -64,5 +63,6 @@ signals: private: SearchBarLineEdit m_searchBarLineEdit; + BookmarkButton m_bookmarkButton; }; #endif // SEARCHBAR_H From fb1d5ea25a9768b94b1d500afa9009801b10a68d Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Tue, 7 May 2024 13:04:15 -0400 Subject: [PATCH 4/6] Create Action and Shortcut for Bookmark Created a ON-OFF action for Bookmark and added in Edit Menu Actions. Assigned shortcut Ctrl + D, which the Donation shortcut is now Ctrl + SHIFT + D. Action disabled for non-Zim tabs --- src/kiwixapp.cpp | 10 +++++++++- src/kiwixapp.h | 1 + src/mainmenu.cpp | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index a8f9863..be38033 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -467,6 +467,8 @@ void KiwixApp::createActions() CREATE_ACTION_ONOFF_ICON_SHORTCUT(ToggleReadingListAction, "reading-list-active", "reading-list", gt("reading-list"), QKeySequence(Qt::CTRL | Qt::Key_B)); + CREATE_ACTION_ONOFF_ICON_SHORTCUT(ToggleAddBookmarkAction, "star-active", "star", gt("add-bookmark"), QKeySequence(Qt::CTRL | Qt::Key_D)); + CREATE_ACTION_SHORTCUTS(ZoomInAction, gt("zoom-in"), QList({QKeySequence::ZoomIn, QKeySequence(Qt::CTRL | Qt::Key_Equal)})); CREATE_ACTION_SHORTCUT(ZoomOutAction, gt("zoom-out"), QKeySequence::ZoomOut); @@ -493,7 +495,7 @@ void KiwixApp::createActions() CREATE_ACTION_ICON_SHORTCUT(SettingAction, "settings", gt("settings"), QKeySequence(Qt::Key_F12)); - CREATE_ACTION_ICON_SHORTCUT(DonateAction, "donate", gt("donate-to-support-kiwix"), QKeySequence(Qt::CTRL | Qt::Key_D)); + CREATE_ACTION_ICON_SHORTCUT(DonateAction, "donate", gt("donate-to-support-kiwix"), QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_D)); CREATE_ACTION_ICON_SHORTCUT(ExitAction, "exit", gt("exit"), QKeySequence::Quit); } @@ -509,12 +511,18 @@ void KiwixApp::postInit() { void KiwixApp::handleItemsState(TabType tabType) { auto libraryOrSettingsTab = (tabType == TabType::LibraryTab || tabType == TabType::SettingsTab); + auto notBookmarkableTab = libraryOrSettingsTab || getTabWidget()->currentArticleUrl().isEmpty(); KiwixApp::instance()->getAction(KiwixApp::ToggleReadingListAction)->setDisabled(libraryOrSettingsTab); + KiwixApp::instance()->getAction(KiwixApp::ToggleAddBookmarkAction)->setDisabled(notBookmarkableTab); KiwixApp::instance()->getAction(KiwixApp::FindInPageAction)->setDisabled(libraryOrSettingsTab); KiwixApp::instance()->getAction(KiwixApp::ZoomInAction)->setDisabled(libraryOrSettingsTab); KiwixApp::instance()->getAction(KiwixApp::ZoomOutAction)->setDisabled(libraryOrSettingsTab); KiwixApp::instance()->getAction(KiwixApp::ZoomResetAction)->setDisabled(libraryOrSettingsTab); KiwixApp::instance()->getAction(KiwixApp::RandomArticleAction)->setDisabled(libraryOrSettingsTab); + + /* Non-Zim tabs are not bookmarkable therefore never in reading list. */ + if (notBookmarkableTab) + KiwixApp::instance()->getAction(KiwixApp::ToggleAddBookmarkAction)->setChecked(false); } void KiwixApp::updateNameMapper() diff --git a/src/kiwixapp.h b/src/kiwixapp.h index ee7901e..5b3322c 100644 --- a/src/kiwixapp.h +++ b/src/kiwixapp.h @@ -46,6 +46,7 @@ public: ToggleFullscreenAction, ToggleTOCAction, ToggleReadingListAction, + ToggleAddBookmarkAction, ZoomInAction, ZoomOutAction, ZoomResetAction, diff --git a/src/mainmenu.cpp b/src/mainmenu.cpp index 54ea0f1..2c0f155 100644 --- a/src/mainmenu.cpp +++ b/src/mainmenu.cpp @@ -35,6 +35,7 @@ MainMenu::MainMenu(QWidget *parent) : m_editMenu.ADD_ACTION(SearchArticleAction); m_editMenu.ADD_ACTION(SearchLibraryAction); m_editMenu.ADD_ACTION(FindInPageAction); + m_editMenu.ADD_ACTION(ToggleAddBookmarkAction); addMenu(&m_editMenu); m_viewMenu.setTitle(gt("view")); From 3c6454d8f47c25496ce63d7b2188220d0cc1eddc Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Tue, 7 May 2024 15:05:13 -0400 Subject: [PATCH 5/6] Connected actions to Bookmark Button BookmarkButton is now a QToolButton to better work with actions. Now clicks can modify menu text displays and menu displays can simulate clicks. --- src/searchbar.cpp | 21 +++++++++------------ src/searchbar.h | 4 ++-- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/searchbar.cpp b/src/searchbar.cpp index 50f4aed..69620c5 100644 --- a/src/searchbar.cpp +++ b/src/searchbar.cpp @@ -7,23 +7,20 @@ #include "suggestionlistworker.h" BookmarkButton::BookmarkButton(QWidget *parent) : - QPushButton(parent) + QToolButton(parent) { - connect(this, &QPushButton::clicked, this, &BookmarkButton::on_buttonClicked); - connect(this, &QPushButton::clicked, this, &BookmarkButton::update_display); + connect(this, &QToolButton::triggered, this, &BookmarkButton::on_buttonClicked); + connect(this, &QToolButton::triggered, this, &BookmarkButton::update_display); + setDefaultAction(KiwixApp::instance()->getAction(KiwixApp::Actions::ToggleAddBookmarkAction)); } void BookmarkButton::update_display() { - auto kiwixApp = KiwixApp::instance(); - if (kiwixApp->isCurrentArticleBookmarked()) { - setIcon(QIcon(":/icons/star-active.svg")); - setToolTip(gt("remove-bookmark")); - } else { - setIcon(QIcon(":/icons/star.svg")); - setToolTip(gt("add-bookmark")); - } - setIconSize(QSize(32, 32)); + auto isBookMarked = KiwixApp::instance()->isCurrentArticleBookmarked(); + auto buttonText = isBookMarked ? gt("remove-bookmark") : gt("add-bookmark"); + defaultAction()->setChecked(isBookMarked); + defaultAction()->setToolTip(buttonText); + defaultAction()->setText(buttonText); } void BookmarkButton::on_buttonClicked() diff --git a/src/searchbar.h b/src/searchbar.h index 5a145ba..f1295ce 100644 --- a/src/searchbar.h +++ b/src/searchbar.h @@ -5,13 +5,13 @@ #include #include #include -#include +#include #include #include #include #include -class BookmarkButton : public QPushButton { +class BookmarkButton : public QToolButton { Q_OBJECT public: BookmarkButton(QWidget *parent = nullptr); From b49d6ec8cabf4b45c38adc24cbcbb4b35b1adf02 Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Tue, 7 May 2024 15:19:40 -0400 Subject: [PATCH 6/6] Updated styles for the QToolBar Redefined styles sheets for new widgets. Increased button svg size since QToolButton doesn't increase button size to be larger than source. --- resources/css/style.css | 47 ++++++++++++++++++++++++++------- resources/icons/star-active.svg | 2 +- resources/icons/star.svg | 2 +- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/resources/css/style.css b/resources/css/style.css index eba6b15..04d29cd 100644 --- a/resources/css/style.css +++ b/resources/css/style.css @@ -32,22 +32,51 @@ QToolButton { SearchBar { background-color: white; - padding: 2px 2px 2px 40px; - max-height: 38px; margin: 2px 5px; - color: #666; - font-size: 16px; border: 1px solid #ccc; border-radius: 3px; + + max-height: 40px; } -SearchBar > QPushButton { - margin: 8px 0px 8px 12px; +SearchBar > QLabel#searchIcon { + padding: 0; + border: none; + background-color: none; + margin: 0px 4px 0px 9px; + + max-height: 38px; + max-width: 38px; +} + +SearchBar > SearchBarLineEdit { + background-color: white; + margin: 0; + padding: 0; + color: #666; + border: none; + font-size: 16px; + + max-height: 38px; +} + +SearchBar > QToolButton { padding: 0; border: 0 solid #fff; - background-color: white; - height: 32px; - width: 32px; + background-color: none; + max-height: 38px; + max-width: 38px; +} + +SearchBar > BookmarkButton { + margin-right: 4px; +} + +SearchBar > QToolButton:pressed, +SearchBar > QToolButton:hover { + border: 1px solid #3366CC; + background-color: #D9E9FF; + border-radius: 3px; } TopWidget QToolButton:pressed, diff --git a/resources/icons/star-active.svg b/resources/icons/star-active.svg index 90002b7..4bdcd1f 100755 --- a/resources/icons/star-active.svg +++ b/resources/icons/star-active.svg @@ -1 +1 @@ -icon / star-active \ No newline at end of file +icon / star-active \ No newline at end of file diff --git a/resources/icons/star.svg b/resources/icons/star.svg index 814b926..a28f57e 100755 --- a/resources/icons/star.svg +++ b/resources/icons/star.svg @@ -1 +1 @@ -icon / star \ No newline at end of file +icon / star \ No newline at end of file