mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
popover: Honor GtkContainer::border-width
The border width is now set around the contained widget.
This commit is contained in:
parent
7c10fc5580
commit
4d12d85919
@ -613,17 +613,20 @@ get_padding_and_border (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkStateFlags state;
|
GtkStateFlags state;
|
||||||
|
gint border_width;
|
||||||
GtkBorder tmp;
|
GtkBorder tmp;
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
context = gtk_widget_get_style_context (widget);
|
||||||
state = gtk_widget_get_state_flags (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_padding (context, state, border);
|
||||||
gtk_style_context_get_border (context, state, &tmp);
|
gtk_style_context_get_border (context, state, &tmp);
|
||||||
border->top += tmp.top;
|
border->top += tmp.top + border_width;
|
||||||
border->right += tmp.right;
|
border->right += tmp.right + border_width;
|
||||||
border->bottom += tmp.bottom;
|
border->bottom += tmp.bottom + border_width;
|
||||||
border->left += tmp.left;
|
border->left += tmp.left + border_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user