Re: long menus
- From: Owen Taylor <otaylor redhat com>
- To: "Sebastian Geerken" <S Geerken ping de>
- Cc: gtk-list gnome org
- Subject: Re: long menus
- Date: 23 Jun 2001 10:59:26 -0400
"Sebastian Geerken" <S Geerken ping de> writes:
> Hi,
>
> are there plans, or already implementations (I haven't looked yet at
> 1.3) on how to let the user control large menus which don't fit on the
> screen, e.g. by scrolling?
Yes, scrolling menus hav been added in GTK+-1.3
Or does this depend on themes? I'm
> currently using a workaround, connecting the "select" signal of all
> menu items to this (unfinished) function:
>
> void justify_menu_item (GtkWidget *widget)
> {
> int y, h, mx, my, sh;
>
> y = widget->allocation.y;
> h = widget->allocation.height;
> gdk_window_get_geometry (widget->parent->parent->window,
> &mx, &my, NULL, NULL, NULL);
> sh = gdk_screen_height ();
>
> if (y + my < 0)
> gdk_window_move (widget->parent->parent->window, mx, - y + 1);
> else if (y + my > sh - h)
> gdk_window_move (widget->parent->parent->window, mx, sh - h - y - 1);
> }
>
> It works for me, but is really a bit hackish. Are there pitfalls why
> it may not work under certain circumstances?
You can find a workaround hack in the GNOME panel - I don't know
how general it is. Other people have used netscape-bookmarks style
continuation submenus.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]