diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2020-01-23 08:55:52 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2020-01-23 08:55:52 +0800 |
commit | b420618c463feb455c7e13d3415ea4b8884975d9 (patch) | |
tree | 4439570a944c641822ee54d67a21364a69a3016d /editor/plugins/polygon_2d_editor_plugin.cpp | |
parent | 94d3bcbc9b523a8aae4cc0dd1f1e522c2171900e (diff) |
Fixes scrollbar positions on HiDPI display
* TextureRegion editor
* Ploygon2D UV editor
Diffstat (limited to 'editor/plugins/polygon_2d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/polygon_2d_editor_plugin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 04d595461d..35c0142d4b 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -92,6 +92,9 @@ void Polygon2DEditor::_notification(int p_what) { b_snap_grid->set_icon(get_icon("Grid", "EditorIcons")); b_snap_enable->set_icon(get_icon("SnapGrid", "EditorIcons")); uv_icon_zoom->set_texture(get_icon("Zoom", "EditorIcons")); + + uv_vscroll->set_anchors_and_margins_preset(PRESET_RIGHT_WIDE); + uv_hscroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE); } break; case NOTIFICATION_VISIBILITY_CHANGED: { @@ -1471,12 +1474,10 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) : uv_vscroll = memnew(VScrollBar); uv_vscroll->set_step(0.001); uv_edit_draw->add_child(uv_vscroll); - uv_vscroll->set_anchors_and_margins_preset(PRESET_RIGHT_WIDE); uv_vscroll->connect("value_changed", this, "_uv_scroll_changed"); uv_hscroll = memnew(HScrollBar); uv_hscroll->set_step(0.001); uv_edit_draw->add_child(uv_hscroll); - uv_hscroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE); uv_hscroll->connect("value_changed", this, "_uv_scroll_changed"); bone_scroll_main_vb = memnew(VBoxContainer); |