summaryrefslogtreecommitdiff
path: root/gtk/gtkframe.c
diff options
context:
space:
mode:
authornana-4 <hnmaigo@gmail.com>2020-08-07 00:54:34 +0900
committernana-4 <hnmaigo@gmail.com>2020-08-20 22:24:36 +0900
commite07827e976e251b26a2c3f798400f3aea806aadf (patch)
tree353e935f0450427c6ad41eab9a99618f77248117 /gtk/gtkframe.c
parent2031bcd38861bc13a101f0c3fc295ed36a5cc96e (diff)
downloadgtk+-e07827e976e251b26a2c3f798400f3aea806aadf.tar.gz
frame: Set GTK_OVERFLOW_HIDDEN
It doesn't really make sense for the frame to allow drawing children outside of it.
Diffstat (limited to 'gtk/gtkframe.c')
-rw-r--r--gtk/gtkframe.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index bd904a57fd..c1542001dd 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -46,6 +46,9 @@
* the top edge of the frame. The horizontal position of the label can
* be controlled with gtk_frame_set_label_align().
*
+ * GtkFrame clips its child. You can use this to add rounded corners to
+ * widgets, but be aware that it also cuts off shadows.
+ *
* # GtkFrame as GtkBuildable
*
* The GtkFrame implementation of the GtkBuildable interface supports
@@ -224,6 +227,8 @@ gtk_frame_init (GtkFrame *frame)
{
GtkFramePrivate *priv = gtk_frame_get_instance_private (frame);
+ gtk_widget_set_overflow (GTK_WIDGET (frame), GTK_OVERFLOW_HIDDEN);
+
priv->label_widget = NULL;
priv->has_frame = TRUE;
priv->label_xalign = 0.0;