mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
plugin: paintable: Fix widget size calculations on non-100% display scaling
Unlike legacy sink that used GLArea, GdkPaintable snapshots without pre-multiplying sizes with scale factor. Remove scaling multiply of our widget dimensions, so both video and widget width/height will be calculated correctly. This fixes both image and black borders displaying issues on displays with non-100% scaling applied.
This commit is contained in:
7
lib/gst/plugin/gstclapperpaintable.c
vendored
7
lib/gst/plugin/gstclapperpaintable.c
vendored
@@ -376,11 +376,8 @@ gst_clapper_paintable_snapshot (GdkPaintable *paintable,
|
||||
gint widget_width = 0, widget_height = 0;
|
||||
|
||||
if ((widget = g_weak_ref_get (&self->widget))) {
|
||||
gint scale_factor;
|
||||
|
||||
scale_factor = gtk_widget_get_scale_factor (widget);
|
||||
widget_width = gtk_widget_get_width (widget) * scale_factor;
|
||||
widget_height = gtk_widget_get_height (widget) * scale_factor;
|
||||
widget_width = gtk_widget_get_width (widget);
|
||||
widget_height = gtk_widget_get_height (widget);
|
||||
|
||||
g_object_unref (widget);
|
||||
}
|
||||
|
Reference in New Issue
Block a user