[widget] minor
This commit is contained in:
parent
e52bd0b3c0
commit
2108bda343
2 changed files with 2 additions and 6 deletions
2
Hardware/3rdparty/bugui
vendored
2
Hardware/3rdparty/bugui
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 92dbd6d9d49bd13e573fa644e71561c696423140
|
Subproject commit 0f5aabb4a70a5e0e82a758a17d27f700a21830e8
|
|
@ -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 (!is_inside(from_x, from_y)) return false;
|
||||||
|
|
||||||
if (from_y != to_y)
|
if (from_y != to_y)
|
||||||
{
|
model.requestHeightChange(to_y / static_cast<double>(parent->height()));
|
||||||
double new_percentage{(1 / static_cast<double>(parent->height())) * to_y};
|
|
||||||
model.requestHeightChange(new_percentage);
|
|
||||||
parent->update();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue