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

Bug#213669: cdebconf-newt-udeb: progress bar dialog changes size all the time, which is ugly



On Wed, Oct 01, 2003 at 10:55:17PM +0200, Steinar H. Gunderson wrote:
> With the "progress bar status text wrapping" patch that was made at
> debcamp, the dialog changes size all the time (it changes height) to
> make room for the new text. When the text changes frequently (like
> installing packages from a fast source) this makes the dialog box change
> size back and forth all the time, which flickers and is really really
> ugly.
> 
> I'd propose keeping it at a fixed height (say, three lines) and simply
> cropping the text if it is larger than that -- alternatively, make the
> minimum height three lines and making it expand above that, which at
> least reduces the flickering considerably.

This isn't such a problem on my 128-column console.  :)

I'd prefer to only let it grow, rather than truncate the text.
Here's the patch I'll commit if it passes testing.

Index: tools/cdebconf/src/modules/frontend/newt/newt.c
===================================================================
RCS file: /cvs/debian-boot/debian-installer/tools/cdebconf/src/modules/frontend/newt/newt.c,v
retrieving revision 1.28
diff -u -r1.28 newt.c
--- tools/cdebconf/src/modules/frontend/newt/newt.c	28 Sep 2003 07:46:42 -0000	1.28
+++ tools/cdebconf/src/modules/frontend/newt/newt.c	2 Oct 2003 12:46:43 -0000
@@ -940,7 +940,7 @@
 	newtGetScreenSize(&width, NULL);
 	win_width = width-7;
 	text_height = get_text_height(info, win_width-2);
-	if (text_height != data->scale_textbox_height) {
+	if (text_height > data->scale_textbox_height) {
 	    newtFormDestroy(data->scale_form);
 	    newtPopWindow();
 	    newtCenteredWindow(win_width, 4 + text_height, obj->progress_title);

-- 
Matty



Reply to: