mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
gtk: Use the display width/height for the widget's preferred width/height
This commit is contained in:
parent
166e33d64c
commit
5cabeb3415
2 changed files with 4 additions and 4 deletions
|
@ -107,7 +107,7 @@ gtk_gst_gl_widget_get_preferred_width (GtkWidget * widget, gint * min,
|
||||||
gint * natural)
|
gint * natural)
|
||||||
{
|
{
|
||||||
GtkGstGLWidget *gst_widget = (GtkGstGLWidget *) widget;
|
GtkGstGLWidget *gst_widget = (GtkGstGLWidget *) widget;
|
||||||
gint video_width = GST_VIDEO_INFO_WIDTH (&gst_widget->priv->v_info);
|
gint video_width = gst_widget->priv->display_width;
|
||||||
|
|
||||||
if (!gst_widget->priv->negotiated)
|
if (!gst_widget->priv->negotiated)
|
||||||
video_width = 10;
|
video_width = 10;
|
||||||
|
@ -123,7 +123,7 @@ gtk_gst_gl_widget_get_preferred_height (GtkWidget * widget, gint * min,
|
||||||
gint * natural)
|
gint * natural)
|
||||||
{
|
{
|
||||||
GtkGstGLWidget *gst_widget = (GtkGstGLWidget *) widget;
|
GtkGstGLWidget *gst_widget = (GtkGstGLWidget *) widget;
|
||||||
gint video_height = GST_VIDEO_INFO_HEIGHT (&gst_widget->priv->v_info);
|
gint video_height = gst_widget->priv->display_height;
|
||||||
|
|
||||||
if (!gst_widget->priv->negotiated)
|
if (!gst_widget->priv->negotiated)
|
||||||
video_height = 10;
|
video_height = 10;
|
||||||
|
|
|
@ -76,7 +76,7 @@ gtk_gst_widget_get_preferred_width (GtkWidget * widget, gint * min,
|
||||||
gint * natural)
|
gint * natural)
|
||||||
{
|
{
|
||||||
GtkGstWidget *gst_widget = (GtkGstWidget *) widget;
|
GtkGstWidget *gst_widget = (GtkGstWidget *) widget;
|
||||||
gint video_width = GST_VIDEO_INFO_WIDTH (&gst_widget->priv->v_info);
|
gint video_width = gst_widget->priv->display_width;
|
||||||
|
|
||||||
if (!gst_widget->priv->negotiated)
|
if (!gst_widget->priv->negotiated)
|
||||||
video_width = 10;
|
video_width = 10;
|
||||||
|
@ -92,7 +92,7 @@ gtk_gst_widget_get_preferred_height (GtkWidget * widget, gint * min,
|
||||||
gint * natural)
|
gint * natural)
|
||||||
{
|
{
|
||||||
GtkGstWidget *gst_widget = (GtkGstWidget *) widget;
|
GtkGstWidget *gst_widget = (GtkGstWidget *) widget;
|
||||||
gint video_height = GST_VIDEO_INFO_HEIGHT (&gst_widget->priv->v_info);
|
gint video_height = gst_widget->priv->display_height;
|
||||||
|
|
||||||
if (!gst_widget->priv->negotiated)
|
if (!gst_widget->priv->negotiated)
|
||||||
video_height = 10;
|
video_height = 10;
|
||||||
|
|
Loading…
Reference in a new issue