[gnome-control-center] mouse: Widget allocated size fallback
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] mouse: Widget allocated size fallback
- Date: Thu, 30 Aug 2012 10:12:24 +0000 (UTC)
commit 936c188bf04a4cddc49308435948e530523d7718
Author: Ondrej Holy <oholy redhat com>
Date: Wed Aug 29 12:44:55 2012 +0200
mouse: Widget allocated size fallback
https://bugzilla.gnome.org/show_bug.cgi?id=579135
panels/mouse/gnome-mouse-test.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/mouse/gnome-mouse-test.c b/panels/mouse/gnome-mouse-test.c
index b0a2b43..13dbd31 100644
--- a/panels/mouse/gnome-mouse-test.c
+++ b/panels/mouse/gnome-mouse-test.c
@@ -206,7 +206,7 @@ button_drawing_area_draw_event (GtkWidget *widget,
GdkRGBA inner_color, outer_color;
cairo_pattern_t *pattern;
- size = MIN (gtk_widget_get_allocated_width (widget), gtk_widget_get_allocated_height (widget));
+ size = MAX (MIN (gtk_widget_get_allocated_width (widget), gtk_widget_get_allocated_height (widget)), 1);
center_x = gtk_widget_get_allocated_width (widget) / 2.0;
center_y = gtk_widget_get_allocated_height (widget) / 2.0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]