Re: a new combo box
- From: Tristan Van Berkom <tristan upstairslabs com>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: a new combo box
- Date: Sat, 27 Dec 2014 22:52:27 +0900
On Sat, 2014-12-27 at 08:02 -0500, Matthias Clasen wrote:
Hi,
over Christmas, I had some for a little side project, a new combo
box. It is based on these mockups:
https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/theming/widgets/combobox-replacements.png
Looks very modern and nice :)
One question I need some feedback on is naming: We currently have
GtkComboBox and
GtkComboBoxText. I've gone with GtkCombo for now, which has the
downside that there is a widget by that name in gtk2. Alternatives
might be GtkChoice or GtkComboButton (with a possible avenue for
making the list-of-choices available for direct embeeding as
GtkComboWidget later).
I guess one obvious question is, how much of this really calls for a
whole new API as a hard requirement ?
Afaics, most of this new look for a GtkComboBox can be accomplished from
the confines of the current GtkComboBox API - filtering the option tree
can also probably be simplified with some GtkTreeModelFiltering and
leveraging of the existing GtkEntryCompletion code... and the group
switching instead of showing recursive menus looks like a nice
refreshing change from the current GtkTreeMenu.
I'm sure the same look can be accomplished with GtkCellViews in the
items, also allowing for flexible customization of the items look
and feel, leveraging the cellview code without adding any additional
API.
From a quick look at gtkcombobox.h, the only really problematic part
is the tabular menu nonsense (set_wrap_width(), set_row_span_column(),
set_column_span_column()). Is there any way we could get around that ?
perhaps just an additional GtkComboBox subclass which explicitly does
not support those tabular menu things and thus would not be an API
break ?
It would be really great if one could just simply change a class
name in their existing code and suddenly benefit from a whole
new look and feel of GtkComboBox...
Best,
-Tristan
There are some lose ends in the code, like the interaction of grouping
and search, but it is complete enough to give it a try and evaluate
the design. If you want to try it, the code is in the wip/combo
branch, and there is a testnewcombo test app with some examples.
I'm off for a few days now - would be great to hear some feedback when
I come back.
Matthias
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]