From 2108bda343f6c5c08c82d134711912a259383415 Mon Sep 17 00:00:00 2001 From: thibaudk Date: Mon, 30 Dec 2024 17:08:14 +0000 Subject: [PATCH] [widget] minor --- Hardware/3rdparty/bugui | 2 +- Hardware/Widgets/IntervalWidget.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Hardware/3rdparty/bugui b/Hardware/3rdparty/bugui index 92dbd6d..0f5aabb 160000 --- a/Hardware/3rdparty/bugui +++ b/Hardware/3rdparty/bugui @@ -1 +1 @@ -Subproject commit 92dbd6d9d49bd13e573fa644e71561c696423140 +Subproject commit 0f5aabb4a70a5e0e82a758a17d27f700a21830e8 diff --git a/Hardware/Widgets/IntervalWidget.cpp b/Hardware/Widgets/IntervalWidget.cpp index 7862aa0..608cc4c 100644 --- a/Hardware/Widgets/IntervalWidget.cpp +++ b/Hardware/Widgets/IntervalWidget.cpp @@ -67,11 +67,7 @@ bool IntervalWidget::on_drag(int from_x, int from_y, int to_x, int to_y) if (!is_inside(from_x, from_y)) return false; if (from_y != to_y) - { - double new_percentage{(1 / static_cast(parent->height())) * to_y}; - model.requestHeightChange(new_percentage); - parent->update(); - } + model.requestHeightChange(to_y / static_cast(parent->height())); return true; }