summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:28:59 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-03 12:28:59 +0100
commit8b180353d85f8695e220a64c007b2dbd43a98892 (patch)
treeec5dc93440614fb840ff5981673cc63963269fc6 /scene
parent12a68071a64aacc490bf11c61c98d61d2aa03610 (diff)
parent6241d003681d8e1ab1deab0841101f3ff3ddcc28 (diff)
Merge pull request #70763 from Maran23/4-x-tree-icon-gap-with-hscrollbar
Fix Scene Tree Editor icons shift when the pane is small
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/tree.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 79bad44e15..4560643998 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2580,8 +2580,8 @@ void Tree::_range_click_timeout() {
mb.instantiate();
int x_limit = get_size().width - theme_cache.panel_style->get_minimum_size().width;
- if (h_scroll->is_visible()) {
- x_limit -= h_scroll->get_minimum_size().width;
+ if (v_scroll->is_visible()) {
+ x_limit -= v_scroll->get_minimum_size().width;
}
cache.rtl = is_layout_rtl();
@@ -3640,8 +3640,8 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
propagate_mouse_activated = false;
int x_limit = get_size().width - theme_cache.panel_style->get_minimum_size().width;
- if (h_scroll->is_visible()) {
- x_limit -= h_scroll->get_minimum_size().width;
+ if (v_scroll->is_visible()) {
+ x_limit -= v_scroll->get_minimum_size().width;
}
cache.rtl = is_layout_rtl();
@@ -4015,8 +4015,8 @@ void Tree::_notification(int p_what) {
Point2 draw_ofs;
draw_ofs += bg->get_offset();
Size2 draw_size = get_size() - bg->get_minimum_size();
- if (h_scroll->is_visible()) {
- draw_size.width -= h_scroll->get_minimum_size().width;
+ if (v_scroll->is_visible()) {
+ draw_size.width -= v_scroll->get_minimum_size().width;
}
bg->draw(ci, Rect2(Point2(), get_size()));