long menus
- From: "Sebastian Geerken" <S Geerken ping de>
- To: gtk-list gnome org
- Subject: long menus
- Date: 23 Jun 2001 16:43:38 +0200
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? 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?
Sebastian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]