Merge pull request #70763 from Maran23/4-x-tree-icon-gap-with-hscrollbar
Fix Scene Tree Editor icons shift when the pane is small
This commit is contained in:
commit
8b180353d8
@ -2580,8 +2580,8 @@ void Tree::_range_click_timeout() {
|
|||||||
mb.instantiate();
|
mb.instantiate();
|
||||||
|
|
||||||
int x_limit = get_size().width - theme_cache.panel_style->get_minimum_size().width;
|
int x_limit = get_size().width - theme_cache.panel_style->get_minimum_size().width;
|
||||||
if (h_scroll->is_visible()) {
|
if (v_scroll->is_visible()) {
|
||||||
x_limit -= h_scroll->get_minimum_size().width;
|
x_limit -= v_scroll->get_minimum_size().width;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache.rtl = is_layout_rtl();
|
cache.rtl = is_layout_rtl();
|
||||||
@ -3640,8 +3640,8 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
propagate_mouse_activated = false;
|
propagate_mouse_activated = false;
|
||||||
|
|
||||||
int x_limit = get_size().width - theme_cache.panel_style->get_minimum_size().width;
|
int x_limit = get_size().width - theme_cache.panel_style->get_minimum_size().width;
|
||||||
if (h_scroll->is_visible()) {
|
if (v_scroll->is_visible()) {
|
||||||
x_limit -= h_scroll->get_minimum_size().width;
|
x_limit -= v_scroll->get_minimum_size().width;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache.rtl = is_layout_rtl();
|
cache.rtl = is_layout_rtl();
|
||||||
@ -4015,8 +4015,8 @@ void Tree::_notification(int p_what) {
|
|||||||
Point2 draw_ofs;
|
Point2 draw_ofs;
|
||||||
draw_ofs += bg->get_offset();
|
draw_ofs += bg->get_offset();
|
||||||
Size2 draw_size = get_size() - bg->get_minimum_size();
|
Size2 draw_size = get_size() - bg->get_minimum_size();
|
||||||
if (h_scroll->is_visible()) {
|
if (v_scroll->is_visible()) {
|
||||||
draw_size.width -= h_scroll->get_minimum_size().width;
|
draw_size.width -= v_scroll->get_minimum_size().width;
|
||||||
}
|
}
|
||||||
|
|
||||||
bg->draw(ci, Rect2(Point2(), get_size()));
|
bg->draw(ci, Rect2(Point2(), get_size()));
|
||||||
|
Loading…
Reference in New Issue
Block a user