mirror of
https://gitlab.gnome.org/GNOME/libmks.git
synced 2024-12-22 05:35:21 +00:00
lib: remove scaling code
This is a GtkPicture oddity and we shouldn't paper over it here. Instead we can handle it in the display widget.
This commit is contained in:
parent
01dab99590
commit
3bc40bdb7b
@ -114,16 +114,11 @@ mks_cairo_framebuffer_snapshot (GdkPaintable *paintable,
|
||||
{
|
||||
MksCairoFramebuffer *self = MKS_CAIRO_FRAMEBUFFER (paintable);
|
||||
static GdkRGBA black = {0,0,0,1};
|
||||
double width_ratio = width / self->width;
|
||||
double height_ratio = height / self->height;
|
||||
|
||||
if (width_ratio > height_ratio)
|
||||
width_ratio = height_ratio;
|
||||
else
|
||||
height_ratio = width_ratio;
|
||||
|
||||
gtk_snapshot_save (snapshot);
|
||||
gtk_snapshot_scale (snapshot, width_ratio, height_ratio);
|
||||
gtk_snapshot_scale (snapshot,
|
||||
width / (double)self->width,
|
||||
height / (double)self->height);
|
||||
|
||||
gtk_snapshot_append_color (snapshot,
|
||||
&black,
|
||||
|
Loading…
Reference in New Issue
Block a user