[gtk-quartz-engine] Allow use of multi-line default buttons (Thanks to Steffen Gutmann)
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-quartz-engine] Allow use of multi-line default buttons (Thanks to Steffen Gutmann)
- Date: Sat, 9 Oct 2010 18:07:54 +0000 (UTC)
commit c1fc6b673a690aa19f9647cce90204741e6ddfc5
Author: John Ralls <jralls ceridwen us>
Date: Thu Oct 8 09:26:39 2009 -0700
Allow use of multi-line default buttons (Thanks to Steffen Gutmann)
src/quartz-style.c | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)
---
diff --git a/src/quartz-style.c b/src/quartz-style.c
index 60d750e..c14ebd4 100644
--- a/src/quartz-style.c
+++ b/src/quartz-style.c
@@ -602,28 +602,15 @@ draw_box (GtkStyle *style,
}
else /* Normal button. */
{
- ThemeButtonKind kind = kThemePushButtonNormal;
+ // ThemeButtonKind kind = kThemePushButtonNormal;
+ // Using kThemePushButton allows for dynamically sized buttons
+ // including those higher than one line of text.
+ ThemeButtonKind kind = kThemePushButton;
if (is_path_bar_button (widget) || is_icon_only_button (widget))
{
kind = kThemeBevelButton;
}
- /* FIXME: Disabled for now. We still need it, but could do
- * something like checking the size using HITheme API and if our
- * button doesn't fit, use a square one.
- */
- else if (0)
- {
- gdouble ratio;
- int max_height = 35; /* FIXME: This should be calculated somehow. */
-
- /* Use weird heuristics for now... */
- ratio = (gdouble) height / (gdouble) width;
- if (height >= max_height || (ratio > 0.4 && ratio < 1.5))
- kind = kThemeBevelButton;
- else
- kind = kThemePushButtonNormal;
- }
quartz_draw_button (style, window, state_type, shadow_type,
widget, detail,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]