From 6b07e8c6241d71040ec423056147922170ba76d9 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Silva Dias Date: Sat, 2 Dec 2017 01:21:45 -0200 Subject: [PATCH] Fixed FileDialog's "parent folder" button not having a texture. --- scene/gui/file_dialog.cpp | 8 +------- scene/resources/default_theme/default_theme.cpp | 1 + .../default_theme/icon_parent_folder.png | Bin 0 -> 329 bytes scene/resources/default_theme/theme_data.h | 4 ++++ 4 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 scene/resources/default_theme/icon_parent_folder.png diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 9bfb70bf428..8af499fd968 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -47,13 +47,7 @@ void FileDialog::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE) { refresh->set_icon(get_icon("reload")); - dir_up->set_icon(get_icon("ArrowUp", "EditorIcons")); - } - - if (p_what == NOTIFICATION_DRAW) { - - //RID ci = get_canvas_item(); - //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size())); + dir_up->set_icon(get_icon("parent_folder")); } if (p_what == NOTIFICATION_POPUP_HIDE) { diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 36988e0c4cf..c5feecd7c44 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -556,6 +556,7 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const // File Dialog theme->set_icon("reload", "FileDialog", make_icon(icon_reload_png)); + theme->set_icon("parent_folder", "FileDialog", make_icon(icon_parent_folder_png)); // Popup diff --git a/scene/resources/default_theme/icon_parent_folder.png b/scene/resources/default_theme/icon_parent_folder.png new file mode 100644 index 0000000000000000000000000000000000000000..47fee1ad8164d56f8cd94e254eb668ce1b23e5f8 GIT binary patch literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1T!dAc}; zSoGeVus4e-P{8ec&+hdCw@>SNJA4ue?6xUz@$eA!Nld@QGL1XBGa~X`zqQ%!-ipPO zy!?NjJu@@$!Lx}02dnKvu39GK-rlF;xoKy_gy%n3{E%geS^B5UluokH48IbS|TE!c~*ATh6auB~^ZC;;MaYtOxjhXq_&a zwCv?J{>?hKua(*gPE-x}_p@2fc=95RZw;2u*%t15%)L%cLqL#OOzG3l`>Nm1G0qeA Vc-el`>JrdL44$rjF6*2UngDZ