summaryrefslogtreecommitdiff
path: root/gtk/gtkvideo.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2019-09-21 14:27:43 +0200
committerTimm Bäder <mail@baedert.org>2019-09-25 17:51:51 +0200
commit29244c5c40e695d1e03819cd66d09a23227d28bd (patch)
treef201887649359318f606336a15b08df533c166a5 /gtk/gtkvideo.c
parentca3d855c44f5bab8de4815756c452f736964d83f (diff)
downloadgtk+-29244c5c40e695d1e03819cd66d09a23227d28bd.tar.gz
video: Use a bin layout
Diffstat (limited to 'gtk/gtkvideo.c')
-rw-r--r--gtk/gtkvideo.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/gtk/gtkvideo.c b/gtk/gtkvideo.c
index 3813d4e80c..1ae48bcddc 100644
--- a/gtk/gtkvideo.c
+++ b/gtk/gtkvideo.c
@@ -21,6 +21,7 @@
#include "gtkvideo.h"
+#include "gtkbinlayout.h"
#include "gtkeventcontrollermotion.h"
#include "gtkimage.h"
#include "gtkintl.h"
@@ -102,39 +103,6 @@ gtk_video_motion (GtkEventControllerMotion *motion,
}
static void
-gtk_video_measure (GtkWidget *widget,
- GtkOrientation orientation,
- int for_size,
- int *minimum,
- int *natural,
- int *minimum_baseline,
- int *natural_baseline)
-{
- GtkVideo *self = GTK_VIDEO (widget);
-
- gtk_widget_measure (self->box,
- orientation,
- for_size,
- minimum, natural,
- minimum_baseline, natural_baseline);
-}
-
-static void
-gtk_video_size_allocate (GtkWidget *widget,
- int width,
- int height,
- int baseline)
-{
- GtkVideo *self = GTK_VIDEO (widget);
-
- gtk_widget_size_allocate (self->box,
- &(GtkAllocation) {
- 0, 0,
- width, height
- }, baseline);
-}
-
-static void
gtk_video_realize (GtkWidget *widget)
{
GtkVideo *self = GTK_VIDEO (widget);
@@ -280,8 +248,6 @@ gtk_video_class_init (GtkVideoClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- widget_class->measure = gtk_video_measure;
- widget_class->size_allocate = gtk_video_size_allocate;
widget_class->realize = gtk_video_realize;
widget_class->unrealize = gtk_video_unrealize;
widget_class->map = gtk_video_map;
@@ -349,6 +315,7 @@ gtk_video_class_init (GtkVideoClass *klass)
gtk_widget_class_bind_template_child (widget_class, GtkVideo, controls_revealer);
gtk_widget_class_bind_template_callback (widget_class, gtk_video_motion);
+ gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("video"));
}