[gnome-games/wip/exalm/gtk4: 48/48] a
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/gtk4: 48/48] a
- Date: Wed, 21 Aug 2019 22:51:16 +0000 (UTC)
commit d030b0d57dca495e2f8c63534fabea0aa71797d4
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Tue Aug 20 21:13:24 2019 +0500
a
src/ui/display-bin.vala | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/ui/display-bin.vala b/src/ui/display-bin.vala
index 1b0625ff..9155abed 100644
--- a/src/ui/display-bin.vala
+++ b/src/ui/display-bin.vala
@@ -28,12 +28,17 @@ public class Games.DisplayBin : Gtk.Bin {
public override void size_allocate (int width, int height, int baseline) {
var child = get_child ();
if (child != null && child.visible) {
- Graphene.Point point = { horizontal_offset, vertical_offset };
+ Gsk.Transform transform = null;
- if (get_direction () == Gtk.TextDirection.RTL)
- point.x = -horizontal_offset;
+ if (horizontal_offset != 0 && vertical_offset != 0) {
+ Graphene.Point point = { horizontal_offset, vertical_offset };
+
+ if (get_direction () == Gtk.TextDirection.RTL)
+ point.x = -horizontal_offset;
+
+ transform = transform.translate (point);
+ }
- var transform = ((Gsk.Transform) null).translate (point);
child.allocate (width, height, baseline, transform);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]