summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-14 08:12:20 +0100
committerGitHub <noreply@github.com>2020-01-14 08:12:20 +0100
commit63112b5090e06239d3551caaf0d03adc990c71e6 (patch)
tree676b6eabb7aa2e32d6502a6471524b1b95ee3699 /scene/gui
parent6a9b38741f38330387074d0ce8384b05c6ff1b7e (diff)
parent712cd8a97ee3a36129f46665149031ff475c8dc0 (diff)
Merge pull request #35106 from YeldhamDev/scrollbar_overlap_fixes
Fix more instances of overlapping scrollbars
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/graph_edit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index be465751b6..42bb8023f2 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -200,6 +200,13 @@ void GraphEdit::_update_scroll() {
else
v_scroll->show();
+ Size2 hmin = h_scroll->get_combined_minimum_size();
+ Size2 vmin = v_scroll->get_combined_minimum_size();
+
+ // Avoid scrollbar overlapping.
+ h_scroll->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, v_scroll->is_visible() ? -vmin.width : 0);
+ v_scroll->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, h_scroll->is_visible() ? -hmin.height : 0);
+
set_block_minimum_size_adjust(false);
if (!awaiting_scroll_offset_update) {