[metacity/cowbell] make sure min isn't greater than max
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [metacity/cowbell] make sure min isn't greater than max
- Date: Wed, 28 Oct 2009 04:05:04 +0000 (UTC)
commit 7f2155caaccee89d5efdeaea1c35c527241e9644
Author: Thomas Thurman <tthurman gnome org>
Date: Wed Oct 28 00:05:01 2009 -0400
make sure min isn't greater than max
src/ui/theme.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 4ee04c3..7351049 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -841,10 +841,14 @@ cowbell_get_button_width (MetaTheme *theme,
double aspect_ratio;
double result;
- /* FIXME: maybe check these are ordered correctly */
ccss_style_get_double (style, "min-width", &min_width);
ccss_style_get_double (style, "max-width", &max_width);
+ if (min_width > max_width)
+ {
+ min_width = max_width;
+ }
+
if (min_width!=0.0 && min_width==max_width)
{
/* gosh, that was easy. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]