[gtk+/popovers: 14/42] popover: Honor GtkContainer::border-width
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/popovers: 14/42] popover: Honor GtkContainer::border-width
- Date: Wed, 15 Jan 2014 12:42:31 +0000 (UTC)
commit bf6383e35fbb849123c7258bb6da0b728a28c436
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 13 11:02:47 2013 +0100
popover: Honor GtkContainer::border-width
The border width is now set around the contained widget.
gtk/gtkpopover.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 2f1157d..b1380cb 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -613,17 +613,20 @@ get_padding_and_border (GtkWidget *widget,
{
GtkStyleContext *context;
GtkStateFlags state;
+ gint border_width;
GtkBorder tmp;
context = gtk_widget_get_style_context (widget);
state = gtk_widget_get_state_flags (widget);
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+
gtk_style_context_get_padding (context, state, border);
gtk_style_context_get_border (context, state, &tmp);
- border->top += tmp.top;
- border->right += tmp.right;
- border->bottom += tmp.bottom;
- border->left += tmp.left;
+ border->top += tmp.top + border_width;
+ border->right += tmp.right + border_width;
+ border->bottom += tmp.bottom + border_width;
+ border->left += tmp.left + border_width;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]