From e25cc7ba38afec68384e94d6bb664cb8bb67a405 Mon Sep 17 00:00:00 2001 From: Jaby Date: Sun, 23 Feb 2025 07:38:11 +0100 Subject: [PATCH] Make test scale work? --- src/Tools/tim_tool/ui/tab/main-tab.slint | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Tools/tim_tool/ui/tab/main-tab.slint b/src/Tools/tim_tool/ui/tab/main-tab.slint index 4da26360..a206a1f1 100644 --- a/src/Tools/tim_tool/ui/tab/main-tab.slint +++ b/src/Tools/tim_tool/ui/tab/main-tab.slint @@ -60,14 +60,14 @@ export component MainTab inherits Rectangle { scale: test_scale; TouchArea { - x: (parent.img_x + self.lines_crossed_x())*1px; - y: (parent.img_y + self.lines_crossed_y())*1px; - width: (parent.img.width + self.lines_crossed_width())*1px; - height: (parent.img.height + self.lines_crossed_height())*1px; + x: ((parent.img_x + self.lines_crossed_x())*1px)*test_scale; + y: ((parent.img_y + self.lines_crossed_y())*1px)*test_scale; + width: ((parent.img.width + self.lines_crossed_width())*1px)*test_scale; + height: ((parent.img.height + self.lines_crossed_height())*1px)*test_scale; mouse-cursor: grab; moved => { self.mouse-cursor = MouseCursor.grabbing; - root.move_vram_image(i, (self.mouse-x - self.pressed-x)/1px, (self.mouse-y - self.pressed-y)/1px); + root.move_vram_image(i, ((self.mouse-x - self.pressed-x)/test_scale)/1px, ((self.mouse-y - self.pressed-y)/test_scale)/1px); cur_sel_x.text = parent.img_x; cur_sel_y.text = parent.img_y; }