Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions material_maker/windows/file_dialog/file_dialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ enum Thumbnail {
PROJECT,
}

func _context_menu_about_to_popup(menu : PopupMenu, root : Control) -> void:
menu.position = root.get_screen_transform() * root.get_local_mouse_position()

func _fix_context_menu() -> void:
if not get_tree().root.gui_embed_subwindows and mm_globals.ui_scale_factor() > 1.0:
for m in get_children(true):
if m is PopupMenu:
m.about_to_popup.connect(
_context_menu_about_to_popup.bind(m, get_child(0, true)))
break

func _ready() -> void:
_fix_context_menu()
load_fav_recents()
if file_mode == FileMode.FILE_MODE_SAVE_FILE:
ok_button_text = tr("Save")
Expand Down