changeset 26561:0a5823a58279

Fix size constraints for vertical progressbars.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 12 Apr 2009 21:32:35 +0000
parents 09ad3b69711f
children 16e2f915e3a0
files finch/libgnt/gntprogressbar.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntprogressbar.c	Sun Apr 12 21:28:59 2009 +0000
+++ b/finch/libgnt/gntprogressbar.c	Sun Apr 12 21:32:35 2009 +0000
@@ -144,7 +144,7 @@
 	gnt_widget_set_take_focus (widget, FALSE);
 	GNT_WIDGET_SET_FLAGS (widget, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW | GNT_WIDGET_GROW_X);
 
-	widget->priv.minw = 1;
+	widget->priv.minw = 8;
 	widget->priv.minh = 1;
 
 	priv->show_value = TRUE;
@@ -203,14 +203,20 @@
 		GntProgressBarOrientation orientation)
 {
 	GntProgressBarPrivate *priv = GNT_PROGRESS_BAR_GET_PRIVATE (pbar);
+	GntWidget *widget = GNT_WIDGET(pbar);
+
 	priv->orientation = orientation;
 	if (orientation == GNT_PROGRESS_LEFT_TO_RIGHT ||
 			orientation == GNT_PROGRESS_RIGHT_TO_LEFT) {
 		GNT_WIDGET_SET_FLAGS(pbar, GNT_WIDGET_GROW_X);
 		GNT_WIDGET_UNSET_FLAGS(pbar, GNT_WIDGET_GROW_Y);
+		widget->priv.minw = 8;
+		widget->priv.minh = 1;
 	} else {
 		GNT_WIDGET_UNSET_FLAGS(pbar, GNT_WIDGET_GROW_X);
 		GNT_WIDGET_SET_FLAGS(pbar, GNT_WIDGET_GROW_Y);
+		widget->priv.minw = 1;
+		widget->priv.minh = 8;
 	}
 
 	if ((GNT_WIDGET_FLAGS(pbar) & GNT_WIDGET_MAPPED))