diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-12-20 04:49:49 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-12-20 04:49:49 +0000 |
commit | c7755bc9498b877aedd6a6a7eeb6004c1f134c4e (patch) | |
tree | 6f9e340b87349bb03c9f4d97684d651305d493af /gtk/gtkframe.c | |
parent | fb14db07bdfb7b0181757c4a0fa33072afc363e7 (diff) | |
download | gtk+-c7755bc9498b877aedd6a6a7eeb6004c1f134c4e.tar.gz |
Check for FreeType using freetype-config, since we can't rely on Xft to
Tue Dec 19 23:47:27 2000 Owen Taylor <otaylor@redhat.com>
* configure.in gdk/x11/Makefile.am: Check for FreeType
using freetype-config, since we can't rely on Xft
to pull in the libraries for us, or rely on it being
in the default include path first.
* gtk/gtkframe.c: Fix some problems where the gap wasn't
being drawn in the right place, especially for right-aligned
frame labels.
Thu Dec 14 21:02:59 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfontsel.c (gtk_font_selection_select_font): Update
the font_name entry as needed.
Diffstat (limited to 'gtk/gtkframe.c')
-rw-r--r-- | gtk/gtkframe.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 61a2a74192..02921ef10a 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -28,6 +28,9 @@ #include "gtkframe.h" #include "gtklabel.h" +#define LABEL_PAD 1 +#define LABEL_SIDE_PAD 2 + enum { ARG_0, ARG_LABEL, @@ -400,14 +403,14 @@ gtk_frame_paint (GtkWidget *widget, y -= height_extra * (1 - frame->label_yalign); height += height_extra * (1 - frame->label_yalign); - x2 = 2 + (frame->child_allocation.width - child_requisition.width) * xalign; + x2 = widget->style->xthickness + (frame->child_allocation.width - child_requisition.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_SIDE_PAD; gtk_paint_shadow_gap (widget->style, widget->window, GTK_STATE_NORMAL, frame->shadow_type, area, widget, "frame", x, y, width, height, GTK_POS_TOP, - x2, child_requisition.width - 4); + x2, child_requisition.width + 2 * LABEL_PAD); } else gtk_paint_shadow (widget->style, widget->window, @@ -459,7 +462,7 @@ gtk_frame_size_request (GtkWidget *widget, { gtk_widget_size_request (frame->label_widget, &child_requisition); - requisition->width = child_requisition.width; + requisition->width = child_requisition.width + 2 * LABEL_PAD + 2 * LABEL_SIDE_PAD; requisition->height = MAX (0, child_requisition.height - GTK_WIDGET (widget)->style->xthickness); } @@ -523,8 +526,8 @@ gtk_frame_size_allocate (GtkWidget *widget, else xalign = 1 - frame->label_xalign; - child_allocation.x = frame->child_allocation.x + - (frame->child_allocation.width - child_requisition.width) * xalign; + child_allocation.x = frame->child_allocation.x + LABEL_SIDE_PAD + + (frame->child_allocation.width - child_requisition.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_PAD; child_allocation.width = child_requisition.width; child_allocation.y = frame->child_allocation.y - child_requisition.height; |