- I reduced the font size of the labels and spinbuttons, but could not
do
that for the units menu. It looks like menus font sizes are not
settable.
Any insights from gtk experts? Because of the too-large units menu, the
aux
toolbar jumps up and down a bit when you switch tools.
You need to set the font size for each menuitem. The OptionMenu just sizes to fit its menuitems.
Still does not work :( Just after
i = gtk_menu_item_new_with_label ( u->abbr );
in units-menu.cpp I added
gtk_widget_modify_font (i, pan);
where pan is a PangoFontDescription. No visible effect, although the same approach works for spinbuttons.
Mmm, I think the units menu works best as an optionmenu.
OK, let's leave it as is for now
As for changing the context menus for spinbuttons, at worst I guess you can add signal handlers for the "button-press-event" and "button-release-event" signals and trap right clicks that way.
And if I just want to remove something from the standard menu? Impossible?
I still have mixed feelings about removing the standard context menus, though :/
Why would one need any special input methods for typing digits?
- I want Esc inside the spinbutton to defocus it. Now Enter applies the
value and defocuses, but this is only because it's hard-coded into the spinbutton to "activate" it and I added defocusing to the value-changed callback. However I don't see how I can change the keybindings within a spinbutton to enable Esc to do what I want. Is this possible at all?
Yes; connect to the widget's "key-press-event" and "key-release-event" signals to trap keypresses.
Thanks, this works, except that deficusing a spinbutton activates it, i.e. applies its value to scale/move. Obviously this is wrong for Esc, which must cancel any changes and restore the old value. But I did not find any way to "undo" a GtkEditable. Does this mean I must implement this myself, by remembering the old text every time I enter a spinbutton and restoring it when leaving by Esc?
_________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...