summaryrefslogtreecommitdiff
path: root/gtk/gtkrendernodepaintable.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-01-03 17:07:39 +0100
committerTimm Bäder <mail@baedert.org>2020-01-07 17:27:19 +0100
commita3f14a3395caac6ebc5e265b8074a9b411bb890d (patch)
treebe187fe16610f4a4d79ad644f29b105ace019df9 /gtk/gtkrendernodepaintable.c
parent73b8212bf347a8675cda1dc5305e13cf57a0fb7f (diff)
downloadgtk+-a3f14a3395caac6ebc5e265b8074a9b411bb890d.tar.gz
rendernodepaintable: ceil() bounds for intrinsic size
Otherweise we floor() implicitly when casting to int, resulting in slight scaling later.
Diffstat (limited to 'gtk/gtkrendernodepaintable.c')
-rw-r--r--gtk/gtkrendernodepaintable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkrendernodepaintable.c b/gtk/gtkrendernodepaintable.c
index 2a85de2aad..a777187247 100644
--- a/gtk/gtkrendernodepaintable.c
+++ b/gtk/gtkrendernodepaintable.c
@@ -76,7 +76,7 @@ gtk_render_node_paintable_paintable_get_intrinsic_width (GdkPaintable *paintable
{
GtkRenderNodePaintable *self = GTK_RENDER_NODE_PAINTABLE (paintable);
- return self->bounds.size.width;
+ return ceilf (self->bounds.size.width);
}
static int
@@ -84,7 +84,7 @@ gtk_render_node_paintable_paintable_get_intrinsic_height (GdkPaintable *paintabl
{
GtkRenderNodePaintable *self = GTK_RENDER_NODE_PAINTABLE (paintable);
- return self->bounds.size.height;
+ return ceilf (self->bounds.size.height);
}
static void