[clutter-gtk] GtkClutterEmbed: Scale allocation by the scale factor
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gtk] GtkClutterEmbed: Scale allocation by the scale factor
- Date: Fri, 14 Feb 2014 13:57:09 +0000 (UTC)
commit 15a1e9e9ca42e6dbd982265403131dfc504651cd
Author: Adel Gadllah <adel gadllah gmail com>
Date: Fri Feb 14 14:13:34 2014 +0100
GtkClutterEmbed: Scale allocation by the scale factor
https://bugzilla.gnome.org/show_bug.cgi?id=724055
clutter-gtk/gtk-clutter-embed.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/clutter-gtk/gtk-clutter-embed.c b/clutter-gtk/gtk-clutter-embed.c
index 14d99bf..5204860 100644
--- a/clutter-gtk/gtk-clutter-embed.c
+++ b/clutter-gtk/gtk-clutter-embed.c
@@ -499,6 +499,7 @@ gtk_clutter_embed_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkClutterEmbedPrivate *priv = GTK_CLUTTER_EMBED (widget)->priv;
+ int scale_factor = gtk_widget_get_scale_factor (widget);
gtk_widget_set_allocation (widget, allocation);
@@ -507,6 +508,11 @@ gtk_clutter_embed_size_allocate (GtkWidget *widget,
*/
clutter_actor_set_size (priv->stage, allocation->width, allocation->height);
+ allocation->x = allocation->x * scale_factor;
+ allocation->x = allocation->x * scale_factor;
+ allocation->width = allocation->width * scale_factor;
+ allocation->height = allocation->height * scale_factor;
+
if (gtk_widget_get_realized (widget))
{
gdk_window_move_resize (gtk_widget_get_window (widget),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]