summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-02-20 07:58:53 -0500
committerIdan Horowitz <idan.horowitz@gmail.com>2022-02-23 18:56:22 +0200
commit495fd1d2c4ebce338a3bc2b231eea7bc4f7001bd (patch)
treec8759d45879c7dd5cad422e2962f0147ef92bad1
parentffe9b1d434977160819f4811bda445559624bee2 (diff)
downloadserenity-495fd1d2c4ebce338a3bc2b231eea7bc4f7001bd.zip
LibGUI: Adjust grabbable rect between Splitter widgets
Previously, the rect began on the edge of the first widget instead of immediately after, causing an overpaint visible on hover.
-rw-r--r--Userland/Libraries/LibGUI/Splitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/Splitter.cpp b/Userland/Libraries/LibGUI/Splitter.cpp
index be1f0ae128..db416160b9 100644
--- a/Userland/Libraries/LibGUI/Splitter.cpp
+++ b/Userland/Libraries/LibGUI/Splitter.cpp
@@ -145,8 +145,8 @@ Gfx::IntRect Splitter::rect_between_widgets(GUI::Widget const& first_widget, GUI
auto first_edge = first_widget_rect.last_edge_for_orientation(m_orientation);
auto second_edge = second_widget_rect.first_edge_for_orientation(m_orientation);
Gfx::IntRect rect;
- rect.set_primary_offset_for_orientation(m_orientation, first_edge);
- rect.set_primary_size_for_orientation(m_orientation, second_edge - first_edge);
+ rect.set_primary_offset_for_orientation(m_orientation, first_edge + 1);
+ rect.set_primary_size_for_orientation(m_orientation, second_edge - first_edge - 1);
rect.set_secondary_offset_for_orientation(m_orientation, 0);
rect.set_secondary_size_for_orientation(m_orientation, relative_rect().secondary_size_for_orientation(m_orientation));
return rect;