GNOME Bugzilla – Bug 769772
Improve the search bar
Last modified: 2018-01-10 14:54:27 UTC
The search bar looks quite broken with the latest GNOME stack. The following patches improve the situation.
Created attachment 333150 [details] [review] searchbar: use the proper arrow icon GtkArrow is a deprecated class and shouldn't be used anymore. Instead, the GNOME-ish way is to use the 'pan-down-symbolic' icon. This patch, then, replaces the deprecated GtkArrow and uses a GtkImage with pan-down-symbolic icon instead.
Created attachment 333151 [details] [review] searchbar: don't use arbitrary width request Setting the width-request to an arbitrary value in pixel-unit is a bad idea, since it doesn't reflect the font the user uses. Instead, use the width-chars property which properly calculates the width based on the font size.
Created attachment 333152 [details] [review] searchbar: turn into a GtkSearchBar subclass Gtk already ships a widget that is ideal to use on search. GNOME Music, however, uses a toolbar and add the search widgets as toolbar items, which causes various flaws on the UI - the major one being not looking like a searchbar anymore. This patch makes the searchbar a GtkSearchBar subclass and adapts the code to treat it as such.
Created attachment 333153 [details] [review] window: don't show search bar's bottom border A hackish solution to a hackish problem.
Review of attachment 333153 [details] [review]: ok, can be joined with the searchbar class patch
Review of attachment 333152 [details] [review]: makes sense. minor formatting nitpick, other than that good to go. ::: gnomemusic/window.py @@ +393,3 @@ # Make sure we skip unprintable chars and don't grab space press # (this is used for play/pause) + if not self.toolbar.searchbar.get_search_mode() and not event.keyval == Gdk.KEY_space: multiple conditions within parenthesis, with binary operator on newline (pep8) if (not foo and not bar)
Review of attachment 333151 [details] [review]: This is one I am not 100% sold on, with the tags this results in a size changing entry field. I'm all for the width-char property, but the size shouldn't change on changing tags.
Review of attachment 333150 [details] [review]: nobrainer, good
I'd say if we can solve the resizing of the entry fueld, then just rebase to 1 patch and good to go.
Thanks for the patches. Just leaves the sizing issue open. Probably needs fixing in gdtaggedentry I guess.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-music/issues/71.