From 1c50de3b380922eea36c59d5cf8dacb58c70d64d Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Sun, 27 Oct 2019 22:38:15 +0100 Subject: New design for extended search options Summary: Replace the arrays of radiobuttons in dolphin search box to more simple dropdown boxes. This provides a leaner look, saving a lot user space on the main view and it is more consistent with the 'Search tools' in the most known sites (Google, DuckDuckGo, etc.) There is room for improvement, as `QComboBox` doesn't match perfectly with the tool buttons used avobe, but I think it is an improvement over the current situation. BEFORE: {F7581883} AFTER: {F7580952} Test Plan: Same behavior with different aesthetics Reviewers: elvisangelaccio, #dolphin, #vdg Subscribers: ndavis, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24602 --- src/search/dolphinfacetswidget.h | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) (limited to 'src/search/dolphinfacetswidget.h') diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h index 9d875f0ae..0a8a5161f 100644 --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -22,10 +22,9 @@ #include -class QButtonGroup; +class QComboBox; class QDate; class QEvent; -class QRadioButton; /** * @brief Allows to filter search-queries by facets. @@ -70,36 +69,12 @@ protected: private: void setRating(const int stars); void setTimespan(const QDate& date); - - /** - * @return New radiobutton which is connected to the - * slotFacedChanged() slot whenever it has - * been toggled. - */ - QRadioButton* createRadioButton(const QString& text, - QButtonGroup* group); + void initComboBox(QComboBox* combo); private: - QRadioButton* m_anyType; - QRadioButton* m_folders; - QRadioButton* m_documents; - QRadioButton* m_images; - QRadioButton* m_audio; - QRadioButton* m_videos; - - QRadioButton* m_anytime; - QRadioButton* m_today; - QRadioButton* m_yesterday; - QRadioButton* m_thisWeek; - QRadioButton* m_thisMonth; - QRadioButton* m_thisYear; - - QRadioButton* m_anyRating; - QRadioButton* m_oneOrMore; - QRadioButton* m_twoOrMore; - QRadioButton* m_threeOrMore; - QRadioButton* m_fourOrMore; - QRadioButton* m_maxRating; + QComboBox* m_typeSelector; + QComboBox* m_dateSelector; + QComboBox* m_ratingSelector; }; #endif -- cgit v1.3