aprilis / messenger

Unofficial Facebook Messenger app for elementary OS
GNU General Public License v3.0
90 stars 7 forks source link

Use Gtk.ListBox instead of TreeView #10

Open Philip-Scott opened 7 years ago

Philip-Scott commented 7 years ago

Is there a reason you're using TreeView instead of a ListBox? With a ListBox you'll be able to do better styling and even add things like the Granite.Avatar :)

aprilis commented 7 years ago

Thanks for suggestion! What I like about TreeView is keeping model and view separately, so I'm not sure if ListBox's features will convince me to make a change, but I need to think about it.

Philip-Scott commented 7 years ago

ListBox allows you to bind a model to it, and a delegate to create your custom widgets. (Or worst case scenario, you can make your own "model" by playing with the signals). But it's worth it :) You can do a lot of fancy styling with ListBox

See: https://valadoc.org/gtk+-3.0/Gtk.ListBox.html

Also, once you have the Granite.Avatar widget, you could even get it's surface to make the pictures on the dock more "elementary" like :wink:

Feel free to ping me if you need help with anything