-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Fix EditorTitleBar excessive width #109396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,6 +86,7 @@ class EditorResourcePreview; | |
| class EditorResourceConversionPlugin; | ||
| class EditorRunBar; | ||
| class EditorSceneTabs; | ||
| class EditorScrollBox; | ||
| class EditorSelectionHistory; | ||
| class EditorSettingsDialog; | ||
| class EditorTitleBar; | ||
|
|
@@ -327,12 +328,11 @@ class EditorNode : public Node { | |
| Control *left_menu_spacer = nullptr; | ||
| Control *right_menu_spacer = nullptr; | ||
| EditorTitleBar *title_bar = nullptr; | ||
| HBoxContainer *title_left_hbox = nullptr; | ||
| HBoxContainer *title_right_hbox = nullptr; | ||
| EditorScrollBox *menu_scroll_box = nullptr; | ||
| EditorScrollBox *main_scroll_box = nullptr; | ||
| EditorRunBar *project_run_bar = nullptr; | ||
| HBoxContainer *right_menu_hb = nullptr; | ||
|
|
||
| // Spacers to center 2D / 3D / Script buttons. | ||
| HBoxContainer *left_spacer = nullptr; | ||
| Control *right_spacer = nullptr; | ||
|
|
||
| Control *menu_btn_spacer = nullptr; | ||
| MenuButton *main_menu_button = nullptr; | ||
|
|
@@ -575,9 +575,9 @@ class EditorNode : public Node { | |
| void _version_control_menu_option(int p_idx); | ||
| void _close_messages(); | ||
| void _show_messages(); | ||
| void _vp_resized(); | ||
| void _titlebar_resized(); | ||
| void _viewport_resized(); | ||
| void _adjust_project_title(); | ||
|
|
||
| void _update_undo_redo_allowed(); | ||
|
|
||
|
|
@@ -735,6 +735,7 @@ class EditorNode : public Node { | |
| static EditorFolding &get_editor_folding() { return singleton->editor_folding; } | ||
|
|
||
| static EditorTitleBar *get_title_bar() { return singleton->title_bar; } | ||
| static HBoxContainer *get_title_bar_right_hbox() { return singleton->title_right_hbox; } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added to keep the main screen buttons centered after adding editor plugins to the title bar using Note: |
||
| static VSplitContainer *get_top_split() { return singleton->top_split; } | ||
| static EditorBottomPanel *get_bottom_panel() { return singleton->bottom_panel; } | ||
| static EditorMainScreen *get_editor_main_screen() { return singleton->editor_main_screen; } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think putting the menu buttons into a Scroll Box is a weird UX, I haven't seen menu buttons be scrollable like this.
It is also inconsistent, since to save space it can already be collapsed to a main menu button with an Editor Setting, there doesn't need to be 2 different ways to allow it to be smaller.
Ideally we would just switch to the collapsed main menu when there isn't enough space.
However I think it would need custom code to detect when it is too small (or something like godotengine/godot-proposals#12397), so this can be changed later in a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main screen plugins might eventually get converted to docks, so the top buttons would become a TabBar.