[gimp/gtk3-port: 209/233] app: don't use "size-request" for the toolbox' wilber, it's gone
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 209/233] app: don't use "size-request" for the toolbox' wilber, it's gone
- Date: Sat, 28 Apr 2018 01:19:18 +0000 (UTC)
commit 42639eb7cd9a62a509a5ecd7017e4e138d1a6db2
Author: Michael Natterer <mitch gimp org>
Date: Fri Nov 4 00:28:04 2011 +0100
app: don't use "size-request" for the toolbox' wilber, it's gone
app/widgets/gimptoolbox.c | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index ef9b586..fb6c2e2 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -121,8 +121,7 @@ static void gimp_toolbox_book_added (GimpDock *dock,
GimpDockbook *dockbook);
static void gimp_toolbox_book_removed (GimpDock *dock,
GimpDockbook *dockbook);
-static void gimp_toolbox_size_request_wilber (GtkWidget *widget,
- GtkRequisition *requisition,
+static void gimp_toolbox_wilber_style_updated (GtkWidget *widget,
GimpToolbox *toolbox);
static gboolean gimp_toolbox_draw_wilber (GtkWidget *widget,
cairo_t *cr);
@@ -235,8 +234,8 @@ gimp_toolbox_constructed (GObject *object)
toolbox->p->header, "visible",
G_BINDING_SYNC_CREATE);
- g_signal_connect (toolbox->p->header, "size-request",
- G_CALLBACK (gimp_toolbox_size_request_wilber),
+ g_signal_connect (toolbox->p->header, "style-updated",
+ G_CALLBACK (gimp_toolbox_wilber_style_updated),
toolbox);
g_signal_connect (toolbox->p->header, "draw",
G_CALLBACK (gimp_toolbox_draw_wilber),
@@ -618,9 +617,8 @@ gimp_toolbox_set_drag_handler (GimpToolbox *toolbox,
/* private functions */
static void
-gimp_toolbox_size_request_wilber (GtkWidget *widget,
- GtkRequisition *requisition,
- GimpToolbox *toolbox)
+gimp_toolbox_wilber_style_updated (GtkWidget *widget,
+ GimpToolbox *toolbox)
{
gint button_width;
gint button_height;
@@ -628,13 +626,9 @@ gimp_toolbox_size_request_wilber (GtkWidget *widget,
if (gimp_tool_palette_get_button_size (GIMP_TOOL_PALETTE (toolbox->p->tool_palette),
&button_width, &button_height))
{
- requisition->width = button_width * PANGO_SCALE_SMALL;
- requisition->height = button_height * PANGO_SCALE_SMALL;
- }
- else
- {
- requisition->width = 16;
- requisition->height = 16;
+ gtk_widget_set_size_request (widget,
+ button_width * PANGO_SCALE_SMALL,
+ button_height * PANGO_SCALE_SMALL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]