diff console/libgnt/gntwidget.c @ 15741:50c25be2563b

Better handle large windows that don't fit into the screen (eg. the preference window when we add more prefs there). The default binding for scrolling in such a window are, for the moment, alt-ctrl-l and alt-ctrl-k. Things still to be done: * Give a clear onscreen indication that there is more to the window than meets the eye. * Update the scrolling when the window is resized. * Use some better binding. * Update the manual.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 27 Feb 2007 09:06:05 +0000
parents 9ca8095b6243
children 9de8f4e810cb
line wrap: on
line diff
--- a/console/libgnt/gntwidget.c	Tue Feb 27 04:58:18 2007 +0000
+++ b/console/libgnt/gntwidget.c	Tue Feb 27 09:06:05 2007 +0000
@@ -323,6 +323,7 @@
 
 	if (widget->window == NULL)
 	{
+#if 0
 		int x, y, maxx, maxy, w, h;
 		int oldw, oldh;
 		gboolean shadow = TRUE;
@@ -355,9 +356,9 @@
 			widget->priv.height = h - shadow;
 			g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh);
 		}
-
-		widget->window = newwin(widget->priv.height + shadow, widget->priv.width + shadow,
-						widget->priv.y, widget->priv.x);
+#else
+		widget->window = newpad(150, 350);  /* XXX: */
+#endif
 		init_widget(widget);
 	}
 
@@ -524,7 +525,6 @@
 
 		if (widget->window)
 		{
-			wresize(widget->window, height + shadow, width + shadow);
 			init_widget(widget);
 		}
 		if (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED))