we make an active server grab now, this way we can change the cursor
Fri Feb 27 15:31:55 1998 Tim Janik <timj@gimp.org> * gtk/gtktipsquery.c: we make an active server grab now, this way we can change the cursor globally and don't need to tweak event masks of other windows. * gtk/gtkframe.c (gtk_frame_style_set): recompute label size. * gtk/gtkwidget.h: * gtk/gtkwidget.c: New signal GtkWidget::style_set to be emitted when a widget's style changed. New flag GTK_RC_STYLE to indicate whether an rc lookup has been perfomed for the widget. (gtk_widget_ensure_style): New function. (gtk_widget_set_rc_style): New function. * docs/styles.txt: new file.
This commit is contained in:
@ -46,6 +46,8 @@ static void gtk_frame_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_frame_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static void gtk_frame_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style);
|
||||
|
||||
|
||||
static GtkBinClass *parent_class = NULL;
|
||||
@ -97,6 +99,7 @@ gtk_frame_class_init (GtkFrameClass *class)
|
||||
widget_class->expose_event = gtk_frame_expose;
|
||||
widget_class->size_request = gtk_frame_size_request;
|
||||
widget_class->size_allocate = gtk_frame_size_allocate;
|
||||
widget_class->style_set = gtk_frame_style_set;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -174,6 +177,25 @@ gtk_frame_new (const gchar *label)
|
||||
return GTK_WIDGET (frame);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_frame_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
GtkFrame *frame;
|
||||
|
||||
frame = GTK_FRAME (widget);
|
||||
|
||||
if (frame->label)
|
||||
{
|
||||
frame->label_width = gdk_string_measure (GTK_WIDGET (frame)->style->font, frame->label) + 7;
|
||||
frame->label_height = (GTK_WIDGET (frame)->style->font->ascent +
|
||||
GTK_WIDGET (frame)->style->font->descent + 1);
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_CLASS (parent_class)->style_set)
|
||||
GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_frame_set_label (GtkFrame *frame,
|
||||
const gchar *label)
|
||||
|
Reference in New Issue
Block a user