[Glade-users] Spacing widgets on menu bar

On Sat, 2007-04-14 at 13:35 -0600, Jeffrey Barish wrote:
Jeffrey Barish wrote:

Yes!  This works and is much easier than writing a size handler.

The suggestion from Alexey is also interesting and basically works.  I
added a generic item to the toolbar and then added a menu bar from the
palette to that item.  However, the color of the menu bar's background is
different from the color of the toolbar's background, so there is a
discontinuity that doesn't look right.  I imagine that there is a way to
adjust the background color, but the suggestion from Tristan is working

I spoke too soon.  The solution from Tristan certainly looks right -- hence
my initial enthusiasm -- but it does not behave right.  My problem is that
two of the items in my UI design need to be image buttons, not image menu
items.  Image menu items normally produce popup menus when actuated, which
I don't want.  I assumed that I would be able to get the image menu items
to behave like image buttons, but I have not succeeded.  Deleting the menu
is not sufficient as the items still cycle through the select and activate
states as if there were a menu present.  I tried many things, including
emitting a button-press-event on button selection to dismiss the
nonexistent menu by simulating a second mouse button click.

Ok this conversation I think has gone a little far without a recap, its
hard to know what exactly it is you are trying to achieve as a
look'n'feel, and its propostorous to think that you could use a
GtkImageMenuItem in the place of a GtkButton, for the simple fact that
menu items go in menus and buttons go into normal containers.

However, I am sure that the layout you have in your artistic mind
can be expressed with gtk+ using the the right packing properties,
containers, alignments, frames etc in the right places - it may take
some getting used to but just consider that the reason we use all these
different containers is to get resize to work "just so" and prioritize
the right parts of your UI for expand/fill purposes alignment purposes
etc, maybe some ascii art or something could help enlighten us on what
exactly you want to achieve.


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