From 9bfe8e3840f04195375946dbe055b14c60c5f42d Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sat, 30 Jan 2021 19:23:40 +0100 Subject: [PATCH] Remove search button and reword search bar hint --- ftl/core/browsing.ftl | 2 +- qt/aqt/browser.py | 1 - qt/aqt/customstudy.py | 4 +--- qt/aqt/forms/browser.ui | 15 ++++----------- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/ftl/core/browsing.ftl b/ftl/core/browsing.ftl index a3053301a..1db3be976 100644 --- a/ftl/core/browsing.ftl +++ b/ftl/core/browsing.ftl @@ -83,7 +83,7 @@ browsing-reposition = Reposition... browsing-reposition-new-cards = Reposition New Cards browsing-reschedule = Reschedule browsing-save-current-filter = Save Current Filter... -browsing-search-bar-hint = Search cards/notes +browsing-search-bar-hint = Type here and press Enter to search for cards and notes. browsing-search-in = Search in: browsing-search-within-formatting-slow = Search within formatting (slow) browsing-shift-position-of-existing-cards = Shift position of existing cards diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index 52a4f2246..8bb54cf72 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -603,7 +603,6 @@ class Browser(QMainWindow): ###################################################################### def setupSearch(self): - qconnect(self.form.searchButton.clicked, self.onSearchActivated) qconnect(self.form.searchEdit.lineEdit().returnPressed, self.onSearchActivated) self.form.searchEdit.setCompleter(None) self.form.searchEdit.lineEdit().setPlaceholderText( diff --git a/qt/aqt/customstudy.py b/qt/aqt/customstudy.py index c752f24fc..baa022243 100644 --- a/qt/aqt/customstudy.py +++ b/qt/aqt/customstudy.py @@ -162,9 +162,7 @@ class CustomStudy(QDialog): if i == RADIO_FORGOT: search = self.mw.col.build_search_string( SearchTerm( - rated=SearchTerm.Rated( - days=spin, rating=SearchTerm.RATING_AGAIN - ) + rated=SearchTerm.Rated(days=spin, rating=SearchTerm.RATING_AGAIN) ) ) dyn["terms"][0] = [search, DYN_MAX_SIZE, DYN_RANDOM] diff --git a/qt/aqt/forms/browser.ui b/qt/aqt/forms/browser.ui index 87335617a..ba6a48980 100644 --- a/qt/aqt/forms/browser.ui +++ b/qt/aqt/forms/browser.ui @@ -107,13 +107,6 @@ - - - - ACTIONS_SEARCH - - - @@ -158,12 +151,12 @@ false - - 20 - false + + 20 + true @@ -223,7 +216,7 @@ 0 0 750 - 22 + 21