Browse Source

Merge pull request #113938 from YeldhamDev/bugs_below_bugs_below_bugs

Fix buttons overflowing in the bottom panel
Thaddeus Crews 2 days ago
parent
commit
43d541195e
2 changed files with 8 additions and 0 deletions
  1. 6 0
      editor/gui/editor_bottom_panel.cpp
  2. 2 0
      editor/gui/editor_bottom_panel.h

+ 6 - 0
editor/gui/editor_bottom_panel.cpp

@@ -128,6 +128,12 @@ void EditorBottomPanel::_repaint() {
 	}
 }
 
+Size2 EditorBottomPanel::get_minimum_size() const {
+	Size2 min_size = TabContainer::get_minimum_size();
+	min_size.x += bottom_hbox->get_combined_minimum_size().x;
+	return min_size;
+}
+
 void EditorBottomPanel::save_layout_to_config(Ref<ConfigFile> p_config_file, const String &p_section) const {
 	Dictionary offsets;
 	for (const KeyValue<String, int> &E : dock_offsets) {

+ 2 - 0
editor/gui/editor_bottom_panel.h

@@ -67,6 +67,8 @@ protected:
 	void _notification(int p_what);
 
 public:
+	virtual Size2 get_minimum_size() const override;
+
 	void save_layout_to_config(Ref<ConfigFile> p_config_file, const String &p_section) const;
 	void load_layout_from_config(Ref<ConfigFile> p_config_file, const String &p_section);