linuxmint / hypnotix

An M3U IPTV Player
1.26k stars 168 forks source link

Add Search box is toggled with search button #165

Closed lulol closed 3 years ago

lulol commented 3 years ago

Search box is hidden by default and is shown pressing the magnifying glass icon of the search button. When the search box is empty it can be hidden again pressing the search button.

Now should be less confusing and certainly is less ugly.

clefebvre commented 3 years ago

Nice!

lulol commented 3 years ago

Ok. I think that can do this:

After you comments yesterday was looking at using Gtk.SearchBar that provides such a sliding search box. The Shortcuts window uses it but seems that it's implemented directly by the toolkit so couldn't peek directly at how was done. Seems that it needs Gtk.Grid and I think that would need extensive modifications to the rest of the layout and I'm not knowledgeable enough about GTK+.

lulol commented 3 years ago

Have rewritten the search code using Gtk.FlowBox.set_filter_func() that seems faster and the proper way to do it instead of destroying and recreating childs unnecessarily (and triggering more network request failures for still missing logos).

Will update soon after a bit more testing with some other of the huge provider lists to verify that all works as expected.

Should I close this PR and start a new one, or is better to just squash all the commits?