Re: GtkComboBox aesthetics



On Mon, 01 Aug 2005 12:00:27 -0500
Greg Breland <gbreland mozillanews org> wrote:

On Mon, 2005-08-01 at 10:09, John Coppens wrote:
What bugs be most is that the ComboBoxEntry _does_ have the same size
as the normal entry. It has almost the same functionality (in fact,
it has more functionality) than the ComboBox, but doesn't have the
possibility to disable the editing, which would convert it into a
(desirable) ComboBox.


I didn't know that, that's good information.  So that proves there is no
physical reason, it must be a compatibility issue with other widget sets
or something.

One of the reasons (and part of the space occupied) is the need for a
'focusing indicator' (the box that appears inside the ComboBox once
focused). In eg. GtkComboBoxEntry, this indicator isn't necessary because
the cursor enters the widget, so there is a positive indication. I think I
eliminated that by disabling focusing.

Another part of the space is padding around the hbox, which I could
remove by modifying the celllayout (setting "ypad" to 0). I suspect this
isn't entirely correct, as I suspect this padding to be present in normal
entries. But it helps...

Now, there's still a few pixels difference, which I can't figure out. I
scanned the source code, and there are _loads_ of height calculations,
but I'm not sufficiently familiar with that... There's a definition:
#define BONUS_PADDING 4
but it seems to be used only in width calculations...

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]