diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-10 10:46:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-10 10:46:05 +0200 |
commit | 81dde2687f2f80f5f365a02d68913322d35e9be1 (patch) | |
tree | 94f684c394768387b551492ab09dee2e64c9344b | |
parent | e93ce339dcdf4e9ade63286cfa04cdd4b5a8ecd4 (diff) | |
parent | 273d2ab9d492fc6855302b69b7219a95f77644aa (diff) |
Merge pull request #10164 from djrm/pr_theme_fixes
Visual polishing
23 files changed, 187 insertions, 84 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index 45da365695..3675948b1d 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -1091,11 +1091,11 @@ void AnimationKeyEditor::_track_editor_draw() { int sep = get_constant("vseparation", "Tree"); int hsep = get_constant("hseparation", "Tree"); Color color = get_color("font_color", "Tree"); - Color sepcolor = get_color("light_color_1", "Editor"); - Color timecolor = get_color("dark_color_2", "Editor"); + Color sepcolor = Color(1, 1, 1, 0.2); + Color timecolor = Color(1, 1, 1, 0.2); Color hover_color = Color(1, 1, 1, 0.05); Color select_color = Color(1, 1, 1, 0.1); - Color invalid_path_color = Color(1, 0.6, 0.4, 0.5); + Color invalid_path_color = get_color("error_color", "Editor"); Color track_select_color = get_color("highlight_color", "Editor"); Ref<Texture> remove_icon = get_icon("Remove", "EditorIcons"); @@ -1156,11 +1156,12 @@ void AnimationKeyEditor::_track_editor_draw() { int settings_limit = size.width - right_separator_ofs; int name_limit = settings_limit * name_column_ratio; - te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), color); - te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), color); + Color linecolor = Color(1, 1, 1, 0.2); + te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), linecolor); + te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), linecolor); te->draw_texture(hsize_icon, ofs + Point2(name_limit - hsize_icon->get_width() - hsep, (h - hsize_icon->get_height()) / 2)); - te->draw_line(ofs + Point2(0, h), ofs + Point2(size.width, h), color); + te->draw_line(ofs + Point2(0, h), ofs + Point2(size.width, h), linecolor); // draw time float keys_from; @@ -1180,7 +1181,7 @@ void AnimationKeyEditor::_track_editor_draw() { int end_px = (l - h_scroll->get_value()) * scale; int begin_px = -h_scroll->get_value() * scale; - Color notimecol = get_color("light_color_1", "Editor"); + Color notimecol = get_color("dark_color_2", "Editor"); { @@ -1276,7 +1277,7 @@ void AnimationKeyEditor::_track_editor_draw() { if ((sc / step) != (prev_sc / step) || (prev_sc < 0 && sc >= 0)) { int scd = sc < 0 ? prev_sc : sc; - te->draw_line(ofs + Point2(name_limit + i, 0), ofs + Point2(name_limit + i, h), color); + te->draw_line(ofs + Point2(name_limit + i, 0), ofs + Point2(name_limit + i, h), linecolor); te->draw_string(font, ofs + Point2(name_limit + i + 3, (h - font->get_height()) / 2 + font->get_ascent()).floor(), String::num((scd - (scd % step)) / double(SC_ADJ), decimals), sub ? color_time_dec : color_time_sec, zoomw - i); } } @@ -1335,7 +1336,7 @@ void AnimationKeyEditor::_track_editor_draw() { te->draw_line(ofs + Point2(0, y + h), ofs + Point2(size.width, y + h), sepcolor); Point2 icon_ofs = ofs + Point2(size.width, y + (h - remove_icon->get_height()) / 2).floor(); - icon_ofs.y += 4; + icon_ofs.y += 4 * EDSCALE; /* icon_ofs.x-=remove_icon->get_width(); @@ -1353,7 +1354,7 @@ void AnimationKeyEditor::_track_editor_draw() { */ track_ofs[0] = size.width - icon_ofs.x; icon_ofs.x -= down_icon->get_width(); - te->draw_texture(down_icon, icon_ofs); + te->draw_texture(down_icon, icon_ofs - Size2(0, 4 * EDSCALE)); int wrap_type = animation->track_get_interpolation_loop_wrap(idx) ? 1 : 0; icon_ofs.x -= hsep; @@ -1366,7 +1367,7 @@ void AnimationKeyEditor::_track_editor_draw() { track_ofs[1] = size.width - icon_ofs.x; icon_ofs.x -= down_icon->get_width(); - te->draw_texture(down_icon, icon_ofs); + te->draw_texture(down_icon, icon_ofs - Size2(0, 4 * EDSCALE)); int interp_type = animation->track_get_interpolation_type(idx); ERR_CONTINUE(interp_type < 0 || interp_type >= 3); @@ -1385,7 +1386,7 @@ void AnimationKeyEditor::_track_editor_draw() { icon_ofs.x -= hsep; icon_ofs.x -= down_icon->get_width(); - te->draw_texture(down_icon, icon_ofs); + te->draw_texture(down_icon, icon_ofs - Size2(0, 4 * EDSCALE)); icon_ofs.x -= hsep; icon_ofs.x -= cont_icon[umode]->get_width(); @@ -3745,7 +3746,7 @@ AnimationKeyEditor::AnimationKeyEditor() { history = EditorNode::get_singleton()->get_editor_history(); ec = memnew(Control); - ec->set_custom_minimum_size(Size2(0, 150)); + ec->set_custom_minimum_size(Size2(0, 150) * EDSCALE); add_child(ec); ec->set_v_size_flags(SIZE_EXPAND_FILL); diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 08b093aecb..219f05ef95 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1061,20 +1061,19 @@ EditorAudioBuses::EditorAudioBuses() { top_hb = memnew(HBoxContainer); add_child(top_hb); + file = memnew(ToolButton); + file->set_text("default_bus_layout.tres"); + top_hb->add_child(file); + file->connect("pressed", this, "_select_layout"); + add = memnew(Button); top_hb->add_child(add); - ; add->set_text(TTR("Add Bus")); add->connect("pressed", this, "_add_bus"); top_hb->add_spacer(); - file = memnew(ToolButton); - file->set_text("default_bus_layout.tres"); - top_hb->add_child(file); - file->connect("pressed", this, "_select_layout"); - load = memnew(Button); load->set_text(TTR("Load")); top_hb->add_child(load); @@ -1096,6 +1095,7 @@ EditorAudioBuses::EditorAudioBuses() { _new->connect("pressed", this, "_new_layout"); bus_scroll = memnew(ScrollContainer); + bus_scroll->add_style_override("panel", memnew(StyleBoxEmpty)); bus_scroll->set_v_size_flags(SIZE_EXPAND_FILL); bus_scroll->set_enable_h_scroll(true); bus_scroll->set_enable_v_scroll(false); diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 91b6cbb3ea..c5e15b97b0 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -143,15 +143,10 @@ EditorLog::EditorLog() { HBoxContainer *hb = memnew(HBoxContainer); vb->add_child(hb); title = memnew(Label); - title->set_text(TTR(" Output:")); + title->set_text(TTR("Output:")); title->set_h_size_flags(SIZE_EXPAND_FILL); hb->add_child(title); - //pd = memnew( PaneDrag ); - //hb->add_child(pd); - //pd->connect("dragged",this,"_dragged"); - //pd->set_default_cursor_shape(Control::CURSOR_MOVE); - clearbutton = memnew(Button); hb->add_child(clearbutton); clearbutton->set_text(TTR("Clear")); @@ -159,7 +154,7 @@ EditorLog::EditorLog() { ec = memnew(Control); vb->add_child(ec); - ec->set_custom_minimum_size(Size2(0, 180)); + ec->set_custom_minimum_size(Size2(0, 180) * EDSCALE); ec->set_v_size_flags(SIZE_EXPAND_FILL); pc = memnew(PanelContainer); diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp index 63bee33092..712a3ac001 100644 --- a/editor/editor_plugin_settings.cpp +++ b/editor/editor_plugin_settings.cpp @@ -193,15 +193,16 @@ EditorPluginSettings::EditorPluginSettings() { plugin_list->set_column_expand(1, false); plugin_list->set_column_expand(2, false); plugin_list->set_column_expand(3, false); - plugin_list->set_column_min_width(1, 100); - plugin_list->set_column_min_width(2, 250); - plugin_list->set_column_min_width(3, 80); + plugin_list->set_column_min_width(1, 100 * EDSCALE); + plugin_list->set_column_min_width(2, 250 * EDSCALE); + plugin_list->set_column_min_width(3, 80 * EDSCALE); plugin_list->set_hide_root(true); plugin_list->connect("item_edited", this, "_plugin_activity_changed"); - MarginContainer *mc = memnew(MarginContainer); + VBoxContainer *mc = memnew(VBoxContainer); mc->add_child(plugin_list); mc->set_v_size_flags(SIZE_EXPAND_FILL); + mc->set_h_size_flags(SIZE_EXPAND_FILL); add_child(mc); diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index 64cf275c3a..78bc99caae 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -129,10 +129,11 @@ String EditorProfiler::_get_time_as_text(Metric &m, float p_time, int p_calls) { Color EditorProfiler::_get_color_from_signature(const StringName &p_signature) const { + Color bc = get_color("error_color", "Editor"); double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF)); Color c; - c.set_hsv(rot, 1, 1); - return c; + c.set_hsv(rot, bc.get_s(), bc.get_v()); + return c.linear_interpolate(get_color("base_color", "Editor"), 0.07); } void EditorProfiler::_item_edited() { @@ -387,7 +388,6 @@ void EditorProfiler::_update_frame() { if (plot_sigs.has(m.categories[i].signature)) { category->set_checked(0, true); - category->set_custom_bg_color(0, Color(0, 0, 0)); category->set_custom_color(0, _get_color_from_signature(m.categories[i].signature)); } @@ -411,7 +411,6 @@ void EditorProfiler::_update_frame() { if (plot_sigs.has(it.signature)) { item->set_checked(0, true); - item->set_custom_bg_color(0, Color(0, 0, 0)); item->set_custom_color(0, _get_color_from_signature(it.signature)); } } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 807aed4267..156f00f6a3 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -163,7 +163,7 @@ Ref<Theme> create_editor_theme() { theme->set_color("light_color_1", "Editor", light_color_1); theme->set_color("light_color_2", "Editor", light_color_2); - Color success_color = highlight_color.linear_interpolate(Color(0, 1, .8), 0.8); + Color success_color = highlight_color.linear_interpolate(Color(.6, 1, .6), 0.8); Color warning_color = highlight_color.linear_interpolate(Color(1, 1, .2), 0.8); Color error_color = highlight_color.linear_interpolate(Color(1, .2, .2), 0.8); theme->set_color("success_color", "Editor", success_color); @@ -382,12 +382,12 @@ Ref<Theme> create_editor_theme() { theme->set_stylebox("SceneTabBG", "EditorStyles", make_empty_stylebox(6, 5, 6, 5)); theme->set_icon("close", "Tabs", title_hl_close_icon); - // Separatos (no separatos) + // Separators (no separators) theme->set_stylebox("separator", "HSeparator", make_line_stylebox(separator_color, border_width)); theme->set_stylebox("separator", "VSeparator", make_line_stylebox(separator_color, border_width, 0, true)); // Debugger - Ref<StyleBoxFlat> style_panel_debugger = make_flat_stylebox(dark_color_2, 0, 4, 0, 0); + Ref<StyleBoxFlat> style_panel_debugger = make_flat_stylebox(dark_color_2, 4, 4, 4, 4); theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger); Ref<StyleBoxFlat> style_tab_fg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 7c5cd48605..8e40850a0c 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1737,7 +1737,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { file_list_vb->set_v_size_flags(SIZE_EXPAND_FILL); path_hb = memnew(HBoxContainer); - path_hb->add_child(memnew(Control)); file_list_vb->add_child(path_hb); button_back = memnew(ToolButton); diff --git a/editor/icons/2x/icon_audio_stream_player_3_d.png b/editor/icons/2x/icon_audio_stream_player_3_d.png Binary files differnew file mode 100644 index 0000000000..917719f54b --- /dev/null +++ b/editor/icons/2x/icon_audio_stream_player_3_d.png diff --git a/editor/icons/2x/icon_bus_vu_frozen.png b/editor/icons/2x/icon_bus_vu_frozen.png Binary files differindex 367322b21c..94d5d335d6 100644 --- a/editor/icons/2x/icon_bus_vu_frozen.png +++ b/editor/icons/2x/icon_bus_vu_frozen.png diff --git a/editor/icons/2x/icon_connect.png b/editor/icons/2x/icon_connect.png Binary files differindex e3f4b8fd12..2a36b1716a 100644 --- a/editor/icons/2x/icon_connect.png +++ b/editor/icons/2x/icon_connect.png diff --git a/editor/icons/2x/icon_native_script.png b/editor/icons/2x/icon_native_script.png Binary files differnew file mode 100644 index 0000000000..31cc130867 --- /dev/null +++ b/editor/icons/2x/icon_native_script.png diff --git a/editor/icons/icon_audio_stream_player_3_d.png b/editor/icons/icon_audio_stream_player_3_d.png Binary files differnew file mode 100644 index 0000000000..60e3528ffd --- /dev/null +++ b/editor/icons/icon_audio_stream_player_3_d.png diff --git a/editor/icons/icon_bus_vu_frozen.png b/editor/icons/icon_bus_vu_frozen.png Binary files differindex 1a6ca6e767..4e9b8f4b4b 100644 --- a/editor/icons/icon_bus_vu_frozen.png +++ b/editor/icons/icon_bus_vu_frozen.png diff --git a/editor/icons/icon_connect.png b/editor/icons/icon_connect.png Binary files differindex 51615838a9..0963063bed 100644 --- a/editor/icons/icon_connect.png +++ b/editor/icons/icon_connect.png diff --git a/editor/icons/icon_native_script.png b/editor/icons/icon_native_script.png Binary files differnew file mode 100644 index 0000000000..ea4fe06704 --- /dev/null +++ b/editor/icons/icon_native_script.png diff --git a/editor/icons/source/icon_audio_stream_player_3_d.svg b/editor/icons/source/icon_audio_stream_player_3_d.svg new file mode 100644 index 0000000000..1858f8fe33 --- /dev/null +++ b/editor/icons/source/icon_audio_stream_player_3_d.svg @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + viewBox="0 0 16 16" + id="svg2" + version="1.1" + inkscape:version="0.92+devel unknown" + inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png" + inkscape:export-xdpi="45" + inkscape:export-ydpi="45" + sodipodi:docname="icon_audio_stream_player_3_d.svg"> + <defs + id="defs4"> + <linearGradient + id="linearGradient959-5" + inkscape:collect="always"> + <stop + style="stop-color:#ff8484;stop-opacity:1" + offset="0" + id="stop957-3" /> + <stop + id="stop955-5" + offset="0.5" + style="stop-color:#e1dc7a;stop-opacity:1" /> + <stop + style="stop-color:#84ffb1;stop-opacity:1" + offset="1" + id="stop953-6" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient959-5" + id="linearGradient4552" + x1="8" + y1="1" + x2="8" + y2="15" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.313709" + inkscape:cx="-0.23400447" + inkscape:cy="10.117538" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + units="px" + inkscape:snap-bbox="true" + inkscape:bbox-paths="true" + inkscape:bbox-nodes="true" + inkscape:snap-bbox-edge-midpoints="true" + inkscape:snap-bbox-midpoints="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-midpoints="true" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true" + inkscape:document-rotation="0"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <path + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#fc9c9c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.97227669;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="m 10.023235,1044.3625 c -0.5613918,-0.013 -1.0235345,0.4264 -1.0234377,0.9724 v 5.0542 c 6.911e-4,0.7482 0.8336124,1.2154 1.4999997,0.8414 l 4,-2.5262 c 0.666937,-0.3743 0.666937,-1.3104 0,-1.6847 l -4,-2.5261 c -0.145049,-0.082 -0.308928,-0.1269 -0.476562,-0.131 z" + id="path4507" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccc" /> + <path + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:url(#linearGradient4552);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="M 11.970703 1.0019531 A 1.0001 1.0001 0 0 0 11.724609 1.0390625 L 4.7246094 3.0390625 A 1.0001 1.0001 0 0 0 4 4 L 4 9.5507812 A 2.5 2.4999914 0 0 0 3.5 9.5 A 2.5 2.4999914 0 0 0 1 12 A 2.5 2.4999914 0 0 0 3.5 14.5 A 2.5 2.4999914 0 0 0 5.9960938 12.087891 A 1.0001 1.0001 0 0 0 6 12 L 6 4.7558594 L 11 3.328125 L 11 6.5 L 13 5.5 L 13 2 A 1.0001 1.0001 0 0 0 11.970703 1.0019531 z " + transform="translate(0,1036.3622)" + id="path4514" /> + </g> +</svg> diff --git a/editor/icons/source/icon_bus_vu_frozen.svg b/editor/icons/source/icon_bus_vu_frozen.svg index 0324076402..40577a1a77 100644 --- a/editor/icons/source/icon_bus_vu_frozen.svg +++ b/editor/icons/source/icon_bus_vu_frozen.svg @@ -15,7 +15,7 @@ viewBox="0 0 16 128" id="svg2" version="1.1" - inkscape:version="0.92.1 r" + inkscape:version="0.92+devel unknown" inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_vu_empty.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" @@ -56,8 +56,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6568543" - inkscape:cx="9.4951314" - inkscape:cy="71.853257" + inkscape:cx="14.809902" + inkscape:cy="65.349668" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -69,8 +69,8 @@ inkscape:snap-bbox-midpoints="true" inkscape:snap-object-midpoints="true" inkscape:snap-center="true" - inkscape:window-width="1600" - inkscape:window-height="836" + inkscape:window-width="1920" + inkscape:window-height="1016" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" @@ -78,7 +78,8 @@ inkscape:snap-intersection-paths="false" inkscape:object-nodes="false" inkscape:snap-smooth-nodes="false" - inkscape:snap-midpoints="false"> + inkscape:snap-midpoints="false" + inkscape:document-rotation="0"> <inkscape:grid type="xygrid" id="grid3336" @@ -92,7 +93,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -102,7 +103,7 @@ id="layer1" transform="translate(0,-924.3622)"> <path - style="fill:url(#linearGradient951);fill-opacity:1;stroke:none;stroke-width:1.28571427;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + style="fill:url(#linearGradient951);fill-opacity:1;stroke:none;stroke-width:1.28571427;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;opacity:0.7" d="M 3 2 C 2.4459952 2 2 2.4459952 2 3 C 2 3.5540048 2.4459952 4 3 4 L 13 4 C 13.554005 4 14 3.5540048 14 3 C 14 2.4459952 13.554005 2 13 2 L 3 2 z M 3 5 C 2.4459952 5 2 5.4459952 2 6 C 2 6.5540048 2.4459952 7 3 7 L 13 7 C 13.554005 7 14 6.5540048 14 6 C 14 5.4459952 13.554005 5 13 5 L 3 5 z M 3 8 C 2.4459952 8 2 8.4459952 2 9 C 2 9.5540048 2.4459952 10 3 10 L 13 10 C 13.554005 10 14 9.5540048 14 9 C 14 8.4459952 13.554005 8 13 8 L 3 8 z M 3 11 C 2.4459952 11 2 11.445995 2 12 C 2 12.554005 2.4459952 13 3 13 L 13 13 C 13.554005 13 14 12.554005 14 12 C 14 11.445995 13.554005 11 13 11 L 3 11 z M 3 14 C 2.4459952 14 2 14.445995 2 15 C 2 15.554005 2.4459952 16 3 16 L 13 16 C 13.554005 16 14 15.554005 14 15 C 14 14.445995 13.554005 14 13 14 L 3 14 z M 3 17 C 2.4459952 17 2 17.445995 2 18 C 2 18.554005 2.4459952 19 3 19 L 13 19 C 13.554005 19 14 18.554005 14 18 C 14 17.445995 13.554005 17 13 17 L 3 17 z M 3 20 C 2.4459952 20 2 20.445995 2 21 C 2 21.554005 2.4459952 22 3 22 L 13 22 C 13.554005 22 14 21.554005 14 21 C 14 20.445995 13.554005 20 13 20 L 3 20 z M 3 23 C 2.4459952 23 2 23.445995 2 24 C 2 24.554005 2.4459952 25 3 25 L 13 25 C 13.554005 25 14 24.554005 14 24 C 14 23.445995 13.554005 23 13 23 L 3 23 z M 3 26 C 2.4459952 26 2 26.445995 2 27 C 2 27.554005 2.4459952 28 3 28 L 13 28 C 13.554005 28 14 27.554005 14 27 C 14 26.445995 13.554005 26 13 26 L 3 26 z M 3 31 C 2.4459952 31 2 31.445995 2 32 C 2 32.554005 2.4459952 33 3 33 L 13 33 C 13.554005 33 14 32.554005 14 32 C 14 31.445995 13.554005 31 13 31 L 3 31 z M 3 34 C 2.4459952 34 2 34.445995 2 35 C 2 35.554005 2.4459952 36 3 36 L 13 36 C 13.554005 36 14 35.554005 14 35 C 14 34.445995 13.554005 34 13 34 L 3 34 z M 3 37 C 2.4459952 37 2 37.445995 2 38 C 2 38.554005 2.4459952 39 3 39 L 13 39 C 13.554005 39 14 38.554005 14 38 C 14 37.445995 13.554005 37 13 37 L 3 37 z M 3 40 C 2.4459952 40 2 40.445995 2 41 C 2 41.554005 2.4459952 42 3 42 L 13 42 C 13.554005 42 14 41.554005 14 41 C 14 40.445995 13.554005 40 13 40 L 3 40 z M 3 43 C 2.4459952 43 2 43.445995 2 44 C 2 44.554005 2.4459952 45 3 45 L 13 45 C 13.554005 45 14 44.554005 14 44 C 14 43.445995 13.554005 43 13 43 L 3 43 z M 3 46 C 2.4459952 46 2 46.445995 2 47 C 2 47.554005 2.4459952 48 3 48 L 13 48 C 13.554005 48 14 47.554005 14 47 C 14 46.445995 13.554005 46 13 46 L 3 46 z M 3 49 C 2.4459952 49 2 49.445995 2 50 C 2 50.554005 2.4459952 51 3 51 L 13 51 C 13.554005 51 14 50.554005 14 50 C 14 49.445995 13.554005 49 13 49 L 3 49 z M 3 52 C 2.4459952 52 2 52.445995 2 53 C 2 53.554005 2.4459952 54 3 54 L 13 54 C 13.554005 54 14 53.554005 14 53 C 14 52.445995 13.554005 52 13 52 L 3 52 z M 3 55 C 2.4459952 55 2 55.445995 2 56 C 2 56.554005 2.4459952 57 3 57 L 13 57 C 13.554005 57 14 56.554005 14 56 C 14 55.445995 13.554005 55 13 55 L 3 55 z M 3 58 C 2.4459952 58 2 58.445995 2 59 C 2 59.554005 2.4459952 60 3 60 L 13 60 C 13.554005 60 14 59.554005 14 59 C 14 58.445995 13.554005 58 13 58 L 3 58 z M 3 61 C 2.4459952 61 2 61.445995 2 62 C 2 62.554005 2.4459952 63 3 63 L 13 63 C 13.554005 63 14 62.554005 14 62 C 14 61.445995 13.554005 61 13 61 L 3 61 z M 3 64 C 2.4459952 64 2 64.445995 2 65 C 2 65.554005 2.4459952 66 3 66 L 13 66 C 13.554005 66 14 65.554005 14 65 C 14 64.445995 13.554005 64 13 64 L 3 64 z M 3 67 C 2.4459952 67 2 67.445995 2 68 C 2 68.554005 2.4459952 69 3 69 L 13 69 C 13.554005 69 14 68.554005 14 68 C 14 67.445995 13.554005 67 13 67 L 3 67 z M 3 70 C 2.4459952 70 2 70.445995 2 71 C 2 71.554005 2.4459952 72 3 72 L 13 72 C 13.554005 72 14 71.554005 14 71 C 14 70.445995 13.554005 70 13 70 L 3 70 z M 3 73 C 2.4459952 73 2 73.445995 2 74 C 2 74.554005 2.4459952 75 3 75 L 13 75 C 13.554005 75 14 74.554005 14 74 C 14 73.445995 13.554005 73 13 73 L 3 73 z M 3 76 C 2.4459952 76 2 76.445995 2 77 C 2 77.554005 2.4459952 78 3 78 L 13 78 C 13.554005 78 14 77.554005 14 77 C 14 76.445995 13.554005 76 13 76 L 3 76 z M 3 79 C 2.4459952 79 2 79.445995 2 80 C 2 80.554005 2.4459952 81 3 81 L 13 81 C 13.554005 81 14 80.554005 14 80 C 14 79.445995 13.554005 79 13 79 L 3 79 z M 3 82 C 2.4459952 82 2 82.445995 2 83 C 2 83.554005 2.4459952 84 3 84 L 13 84 C 13.554005 84 14 83.554005 14 83 C 14 82.445995 13.554005 82 13 82 L 3 82 z M 3 85 C 2.4459952 85 2 85.445995 2 86 C 2 86.554005 2.4459952 87 3 87 L 13 87 C 13.554005 87 14 86.554005 14 86 C 14 85.445995 13.554005 85 13 85 L 3 85 z M 3 88 C 2.4459952 88 2 88.445995 2 89 C 2 89.554005 2.4459952 90 3 90 L 13 90 C 13.554005 90 14 89.554005 14 89 C 14 88.445995 13.554005 88 13 88 L 3 88 z M 3 91 C 2.4459952 91 2 91.445995 2 92 C 2 92.554005 2.4459952 93 3 93 L 13 93 C 13.554005 93 14 92.554005 14 92 C 14 91.445995 13.554005 91 13 91 L 3 91 z M 3 94 C 2.4459952 94 2 94.445995 2 95 C 2 95.554005 2.4459952 96 3 96 L 13 96 C 13.554005 96 14 95.554005 14 95 C 14 94.445995 13.554005 94 13 94 L 3 94 z M 3 97 C 2.4459952 97 2 97.445995 2 98 C 2 98.554005 2.4459952 99 3 99 L 13 99 C 13.554005 99 14 98.554005 14 98 C 14 97.445995 13.554005 97 13 97 L 3 97 z M 3 100 C 2.4459952 100 2 100.446 2 101 C 2 101.554 2.4459952 102 3 102 L 13 102 C 13.554005 102 14 101.554 14 101 C 14 100.446 13.554005 100 13 100 L 3 100 z M 3 103 C 2.4459952 103 2 103.446 2 104 C 2 104.554 2.4459952 105 3 105 L 13 105 C 13.554005 105 14 104.554 14 104 C 14 103.446 13.554005 103 13 103 L 3 103 z M 3 106 C 2.4459952 106 2 106.446 2 107 C 2 107.554 2.4459952 108 3 108 L 13 108 C 13.554005 108 14 107.554 14 107 C 14 106.446 13.554005 106 13 106 L 3 106 z M 3 109 C 2.4459952 109 2 109.446 2 110 C 2 110.554 2.4459952 111 3 111 L 13 111 C 13.554005 111 14 110.554 14 110 C 14 109.446 13.554005 109 13 109 L 3 109 z M 3 112 C 2.4459952 112 2 112.446 2 113 C 2 113.554 2.4459952 114 3 114 L 13 114 C 13.554005 114 14 113.554 14 113 C 14 112.446 13.554005 112 13 112 L 3 112 z M 3 115 C 2.4459952 115 2 115.446 2 116 C 2 116.554 2.4459952 117 3 117 L 13 117 C 13.554005 117 14 116.554 14 116 C 14 115.446 13.554005 115 13 115 L 3 115 z M 3 118 C 2.4459952 118 2 118.446 2 119 C 2 119.554 2.4459952 120 3 120 L 13 120 C 13.554005 120 14 119.554 14 119 C 14 118.446 13.554005 118 13 118 L 3 118 z M 3 121 C 2.4459952 121 2 121.446 2 122 C 2 122.554 2.4459952 123 3 123 L 13 123 C 13.554005 123 14 122.554 14 122 C 14 121.446 13.554005 121 13 121 L 3 121 z M 3 124 C 2.4459952 124 2 124.446 2 125 C 2 125.554 2.4459952 126 3 126 L 13 126 C 13.554005 126 14 125.554 14 125 C 14 124.446 13.554005 124 13 124 L 3 124 z " id="rect852" transform="translate(0,924.3622)" /> diff --git a/editor/icons/source/icon_g_d_native_script.svg b/editor/icons/source/icon_native_script.svg index 33a8e52a5d..33a8e52a5d 100644 --- a/editor/icons/source/icon_g_d_native_script.svg +++ b/editor/icons/source/icon_native_script.svg diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 6238cad14d..019ed47e81 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -1534,14 +1534,14 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { VBoxContainer *vbc = memnew(VBoxContainer); input_base->add_child(vbc); - vbc->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 5); - vbc->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 5); - vbc->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); - vbc->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5); + vbc->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 0); + vbc->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 0); + vbc->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 0); + vbc->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 0); l = memnew(Label); vbc->add_child(l); - l->set_position(Point2(6, 5)); + l->set_position(Point2(6, 5) * EDSCALE); l->set_text(TTR("Action:")); hbc = memnew(HBoxContainer); @@ -1632,6 +1632,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { //translations TabContainer *translations = memnew(TabContainer); + translations->add_style_override("panel", memnew(StyleBoxEmpty)); translations->set_tab_align(TabContainer::ALIGN_LEFT); translations->set_name(TTR("Localization")); tab_container->add_child(translations); @@ -1648,7 +1649,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { Button *addtr = memnew(Button(TTR("Add.."))); addtr->connect("pressed", this, "_translation_file_open"); thb->add_child(addtr); - MarginContainer *tmc = memnew(MarginContainer); + VBoxContainer *tmc = memnew(VBoxContainer); tvb->add_child(tmc); tmc->set_v_size_flags(SIZE_EXPAND_FILL); translation_list = memnew(Tree); @@ -1672,7 +1673,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { Button *addtr = memnew(Button(TTR("Add.."))); addtr->connect("pressed", this, "_translation_res_file_open"); thb->add_child(addtr); - MarginContainer *tmc = memnew(MarginContainer); + VBoxContainer *tmc = memnew(VBoxContainer); tvb->add_child(tmc); tmc->set_v_size_flags(SIZE_EXPAND_FILL); translation_remap = memnew(Tree); @@ -1694,7 +1695,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { addtr->connect("pressed", this, "_translation_res_option_file_open"); translation_res_option_add_button = addtr; thb->add_child(addtr); - tmc = memnew(MarginContainer); + tmc = memnew(VBoxContainer); tvb->add_child(tmc); tmc->set_v_size_flags(SIZE_EXPAND_FILL); translation_remap_options = memnew(Tree); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index a3a10c6c5a..0777b6950e 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -45,7 +45,6 @@ #include "pair.h" #include "print_string.h" #include "project_settings.h" -#include "project_settings.h" #include "property_selector.h" #include "scene/gui/label.h" #include "scene/main/viewport.h" @@ -321,7 +320,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: CheckBox *c = checks20[0]; c->set_text("True"); - checks20gc->set_position(Vector2(4, 4)); + checks20gc->set_position(Vector2(4, 4) * EDSCALE); c->set_pressed(v); c->show(); @@ -434,14 +433,14 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } else if (hint == PROPERTY_HINT_EXP_EASING) { - easing_draw->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); - easing_draw->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5); - easing_draw->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 5); - easing_draw->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 30); - type_button->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 3); - type_button->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 3); - type_button->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, 25); - type_button->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 7); + easing_draw->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5 * EDSCALE); + easing_draw->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5 * EDSCALE); + easing_draw->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 5 * EDSCALE); + easing_draw->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 30 * EDSCALE); + type_button->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 3 * EDSCALE); + type_button->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 3 * EDSCALE); + type_button->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, 25 * EDSCALE); + type_button->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 7 * EDSCALE); type_button->set_text(TTR("Preset..")); type_button->get_popup()->clear(); type_button->get_popup()->add_item(TTR("Linear"), EASING_LINEAR); @@ -524,7 +523,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: action_buttons[0]->set_anchor(MARGIN_TOP, ANCHOR_END); action_buttons[0]->set_anchor(MARGIN_RIGHT, ANCHOR_END); action_buttons[0]->set_anchor(MARGIN_BOTTOM, ANCHOR_END); - action_buttons[0]->set_begin(Point2(70, button_margin - 5)); + action_buttons[0]->set_begin(Point2(70 * EDSCALE, button_margin - 5 * EDSCALE)); action_buttons[0]->set_end(Point2(margin, margin)); action_buttons[0]->set_text(TTR("Close")); action_buttons[0]->show(); @@ -872,7 +871,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: break; menu->clear(); - menu->set_size(Size2(1, 1)); + menu->set_size(Size2(1, 1) * EDSCALE); if (p_name == "script" && hint_text == "Script" && owner->cast_to<Node>()) { menu->add_icon_item(get_icon("Script", "EditorIcons"), TTR("New Script"), OBJ_MENU_NEW_SCRIPT); @@ -921,7 +920,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: if (!RES(v).is_null()) { - menu->add_icon_item(get_icon("EditResource", "EditorIcons"), "Edit", OBJ_MENU_EDIT); + menu->add_icon_item(get_icon("Edit", "EditorIcons"), "Edit", OBJ_MENU_EDIT); menu->add_icon_item(get_icon("Del", "EditorIcons"), "Clear", OBJ_MENU_CLEAR); menu->add_icon_item(get_icon("Duplicate", "EditorIcons"), "Make Unique", OBJ_MENU_MAKE_UNIQUE); RES r = v; diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 390d13e64e..94ef712c25 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -185,19 +185,19 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { if (part_of_subscene) { //item->set_selectable(0,marked_selectable); - item->set_custom_color(0, Color(0.8, 0.4, 0.20)); + item->set_custom_color(0, get_color("error_color", "Editor").linear_interpolate(get_color("warning_color", "Editor"), 0.4)); } else if (marked.has(p_node)) { item->set_selectable(0, marked_selectable); - item->set_custom_color(0, Color(0.8, 0.1, 0.10)); + item->set_custom_color(0, get_color("error_color", "Editor")); } else if (!marked_selectable && !marked_children_selectable) { Node *node = p_node; while (node) { if (marked.has(node)) { item->set_selectable(0, false); - item->set_custom_color(0, Color(0.8, 0.1, 0.10)); + item->set_custom_color(0, get_color("error_color", "Editor")); break; } node = node->get_parent(); diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 45d2e54838..01cfdc1b57 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -637,7 +637,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da } else if (p_msg == "profile_sig") { //cache a signature - print_line("SIG: " + String(Variant(p_data))); profiler_signature[p_data[1]] = p_data[0]; } else if (p_msg == "profile_frame" || p_msg == "profile_total") { @@ -796,8 +795,9 @@ void ScriptEditorDebugger::_performance_draw() { r.position += graph_sb->get_offset(); r.size -= graph_sb->get_minimum_size(); int pi = which[i]; - Color c = Color(0.7, 0.9, 0.5); + Color c = get_color("success_color", "Editor"); c.set_hsv(Math::fmod(c.get_h() + pi * 0.7654, 1), c.get_s(), c.get_v()); + //c = c.linear_interpolate(get_color("base_color", "Editor"), 0.9); c.a = 0.8; perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x); @@ -848,6 +848,8 @@ void ScriptEditorDebugger::_notification(int p_what) { error_stack->connect("item_selected", this, "_error_stack_selected"); vmem_refresh->set_icon(get_icon("Reload", "EditorIcons")); + reason->add_color_override("font_color", get_color("error_color", "Editor")); + } break; case NOTIFICATION_PROCESS: { @@ -1616,13 +1618,10 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { HBoxContainer *hbc = memnew(HBoxContainer); vbc->add_child(hbc); - reason = memnew(LineEdit); + reason = memnew(Label); reason->set_text(""); - reason->set_editable(false); hbc->add_child(reason); - reason->add_color_override("font_color", Color(1, 0.4, 0.0, 0.8)); reason->set_h_size_flags(SIZE_EXPAND_FILL); - //reason->set_clip_text(true); hbc->add_child(memnew(VSeparator)); @@ -1648,8 +1647,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { docontinue->set_tooltip(TTR("Continue")); docontinue->connect("pressed", this, "debug_continue"); - //hbc->add_child( memnew( VSeparator) ); - back = memnew(Button); hbc->add_child(back); back->set_tooltip(TTR("Inspect Previous Instance")); @@ -1691,10 +1688,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { breaked = false; tabs->add_child(dbg); - //tabs->move_child(vbc,0); - - hbc = memnew(HBoxContainer); - vbc->add_child(hbc); } { //errors @@ -1822,7 +1815,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { vmem_vb->add_child(vmem_hb); vmem_refresh->connect("pressed", this, "_video_mem_request"); - MarginContainer *vmmc = memnew(MarginContainer); + VBoxContainer *vmmc = memnew(VBoxContainer); vmem_tree = memnew(Tree); vmem_tree->set_v_size_flags(SIZE_EXPAND_FILL); vmem_tree->set_h_size_flags(SIZE_EXPAND_FILL); diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h index 907c267d49..d255d73167 100644 --- a/editor/script_editor_debugger.h +++ b/editor/script_editor_debugger.h @@ -89,7 +89,7 @@ class ScriptEditorDebugger : public Control { TabContainer *tabs; - LineEdit *reason; + Label *reason; ScriptEditorDebuggerVariables *variables; Button *step; |