1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Use FlowContainer to handle toolbar overflow more gracefully

This commit is contained in:
Yuri Sizov
2022-07-20 17:22:36 +03:00
parent e830d9d7cc
commit 842c3a644f
4 changed files with 85 additions and 77 deletions

View File

@@ -238,11 +238,10 @@ private:
HScrollBar *h_scroll;
VScrollBar *v_scroll;
HBoxContainer *hb;
// Used for secondary menu items which are displayed depending on the currently selected node
// (such as MeshInstance's "Mesh" menu).
PanelContainer *context_menu_container;
HBoxContainer *hbc_context_menu;
PanelContainer *context_menu_panel = nullptr;
HBoxContainer *context_menu_hbox = nullptr;
ToolButton *zoom_minus;
ToolButton *zoom_reset;
@@ -584,8 +583,6 @@ protected:
static void _bind_methods();
HBoxContainer *get_panel_hb() { return hb; }
struct compare_items_x {
bool operator()(const CanvasItem *a, const CanvasItem *b) const {
return a->get_global_transform().elements[2].x < b->get_global_transform().elements[2].x;