Merge pull request #10164 from djrm/pr_theme_fixes

Visual polishing
This commit is contained in:
Rémi Verschelde 2017-08-10 10:46:05 +02:00 committed by GitHub
commit 81dde2687f
23 changed files with 187 additions and 84 deletions

View file

@ -1091,11 +1091,11 @@ void AnimationKeyEditor::_track_editor_draw() {
int sep = get_constant("vseparation", "Tree"); int sep = get_constant("vseparation", "Tree");
int hsep = get_constant("hseparation", "Tree"); int hsep = get_constant("hseparation", "Tree");
Color color = get_color("font_color", "Tree"); Color color = get_color("font_color", "Tree");
Color sepcolor = get_color("light_color_1", "Editor"); Color sepcolor = Color(1, 1, 1, 0.2);
Color timecolor = get_color("dark_color_2", "Editor"); Color timecolor = Color(1, 1, 1, 0.2);
Color hover_color = Color(1, 1, 1, 0.05); Color hover_color = Color(1, 1, 1, 0.05);
Color select_color = Color(1, 1, 1, 0.1); 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"); Color track_select_color = get_color("highlight_color", "Editor");
Ref<Texture> remove_icon = get_icon("Remove", "EditorIcons"); 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 settings_limit = size.width - right_separator_ofs;
int name_limit = settings_limit * name_column_ratio; int name_limit = settings_limit * name_column_ratio;
te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), color); Color linecolor = Color(1, 1, 1, 0.2);
te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), color); 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_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 // draw time
float keys_from; float keys_from;
@ -1180,7 +1181,7 @@ void AnimationKeyEditor::_track_editor_draw() {
int end_px = (l - h_scroll->get_value()) * scale; int end_px = (l - h_scroll->get_value()) * scale;
int begin_px = -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)) { if ((sc / step) != (prev_sc / step) || (prev_sc < 0 && sc >= 0)) {
int scd = sc < 0 ? prev_sc : sc; 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); 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); 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(); 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(); /* icon_ofs.x-=remove_icon->get_width();
@ -1353,7 +1354,7 @@ void AnimationKeyEditor::_track_editor_draw() {
*/ */
track_ofs[0] = size.width - icon_ofs.x; track_ofs[0] = size.width - icon_ofs.x;
icon_ofs.x -= down_icon->get_width(); 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; int wrap_type = animation->track_get_interpolation_loop_wrap(idx) ? 1 : 0;
icon_ofs.x -= hsep; icon_ofs.x -= hsep;
@ -1366,7 +1367,7 @@ void AnimationKeyEditor::_track_editor_draw() {
track_ofs[1] = size.width - icon_ofs.x; track_ofs[1] = size.width - icon_ofs.x;
icon_ofs.x -= down_icon->get_width(); 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); int interp_type = animation->track_get_interpolation_type(idx);
ERR_CONTINUE(interp_type < 0 || interp_type >= 3); ERR_CONTINUE(interp_type < 0 || interp_type >= 3);
@ -1385,7 +1386,7 @@ void AnimationKeyEditor::_track_editor_draw() {
icon_ofs.x -= hsep; icon_ofs.x -= hsep;
icon_ofs.x -= down_icon->get_width(); 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 -= hsep;
icon_ofs.x -= cont_icon[umode]->get_width(); icon_ofs.x -= cont_icon[umode]->get_width();
@ -3745,7 +3746,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
history = EditorNode::get_singleton()->get_editor_history(); history = EditorNode::get_singleton()->get_editor_history();
ec = memnew(Control); ec = memnew(Control);
ec->set_custom_minimum_size(Size2(0, 150)); ec->set_custom_minimum_size(Size2(0, 150) * EDSCALE);
add_child(ec); add_child(ec);
ec->set_v_size_flags(SIZE_EXPAND_FILL); ec->set_v_size_flags(SIZE_EXPAND_FILL);

View file

@ -1061,20 +1061,19 @@ EditorAudioBuses::EditorAudioBuses() {
top_hb = memnew(HBoxContainer); top_hb = memnew(HBoxContainer);
add_child(top_hb); 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); add = memnew(Button);
top_hb->add_child(add); top_hb->add_child(add);
;
add->set_text(TTR("Add Bus")); add->set_text(TTR("Add Bus"));
add->connect("pressed", this, "_add_bus"); add->connect("pressed", this, "_add_bus");
top_hb->add_spacer(); 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 = memnew(Button);
load->set_text(TTR("Load")); load->set_text(TTR("Load"));
top_hb->add_child(load); top_hb->add_child(load);
@ -1096,6 +1095,7 @@ EditorAudioBuses::EditorAudioBuses() {
_new->connect("pressed", this, "_new_layout"); _new->connect("pressed", this, "_new_layout");
bus_scroll = memnew(ScrollContainer); bus_scroll = memnew(ScrollContainer);
bus_scroll->add_style_override("panel", memnew(StyleBoxEmpty));
bus_scroll->set_v_size_flags(SIZE_EXPAND_FILL); bus_scroll->set_v_size_flags(SIZE_EXPAND_FILL);
bus_scroll->set_enable_h_scroll(true); bus_scroll->set_enable_h_scroll(true);
bus_scroll->set_enable_v_scroll(false); bus_scroll->set_enable_v_scroll(false);

View file

@ -143,15 +143,10 @@ EditorLog::EditorLog() {
HBoxContainer *hb = memnew(HBoxContainer); HBoxContainer *hb = memnew(HBoxContainer);
vb->add_child(hb); vb->add_child(hb);
title = memnew(Label); title = memnew(Label);
title->set_text(TTR(" Output:")); title->set_text(TTR("Output:"));
title->set_h_size_flags(SIZE_EXPAND_FILL); title->set_h_size_flags(SIZE_EXPAND_FILL);
hb->add_child(title); 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); clearbutton = memnew(Button);
hb->add_child(clearbutton); hb->add_child(clearbutton);
clearbutton->set_text(TTR("Clear")); clearbutton->set_text(TTR("Clear"));
@ -159,7 +154,7 @@ EditorLog::EditorLog() {
ec = memnew(Control); ec = memnew(Control);
vb->add_child(ec); 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); ec->set_v_size_flags(SIZE_EXPAND_FILL);
pc = memnew(PanelContainer); pc = memnew(PanelContainer);

View file

@ -193,15 +193,16 @@ EditorPluginSettings::EditorPluginSettings() {
plugin_list->set_column_expand(1, false); plugin_list->set_column_expand(1, false);
plugin_list->set_column_expand(2, false); plugin_list->set_column_expand(2, false);
plugin_list->set_column_expand(3, false); plugin_list->set_column_expand(3, false);
plugin_list->set_column_min_width(1, 100); plugin_list->set_column_min_width(1, 100 * EDSCALE);
plugin_list->set_column_min_width(2, 250); plugin_list->set_column_min_width(2, 250 * EDSCALE);
plugin_list->set_column_min_width(3, 80); plugin_list->set_column_min_width(3, 80 * EDSCALE);
plugin_list->set_hide_root(true); plugin_list->set_hide_root(true);
plugin_list->connect("item_edited", this, "_plugin_activity_changed"); plugin_list->connect("item_edited", this, "_plugin_activity_changed");
MarginContainer *mc = memnew(MarginContainer); VBoxContainer *mc = memnew(VBoxContainer);
mc->add_child(plugin_list); mc->add_child(plugin_list);
mc->set_v_size_flags(SIZE_EXPAND_FILL); mc->set_v_size_flags(SIZE_EXPAND_FILL);
mc->set_h_size_flags(SIZE_EXPAND_FILL);
add_child(mc); add_child(mc);

View file

@ -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 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)); double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF));
Color c; Color c;
c.set_hsv(rot, 1, 1); c.set_hsv(rot, bc.get_s(), bc.get_v());
return c; return c.linear_interpolate(get_color("base_color", "Editor"), 0.07);
} }
void EditorProfiler::_item_edited() { void EditorProfiler::_item_edited() {
@ -387,7 +388,6 @@ void EditorProfiler::_update_frame() {
if (plot_sigs.has(m.categories[i].signature)) { if (plot_sigs.has(m.categories[i].signature)) {
category->set_checked(0, true); 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)); 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)) { if (plot_sigs.has(it.signature)) {
item->set_checked(0, true); 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)); item->set_custom_color(0, _get_color_from_signature(it.signature));
} }
} }

View file

@ -163,7 +163,7 @@ Ref<Theme> create_editor_theme() {
theme->set_color("light_color_1", "Editor", light_color_1); theme->set_color("light_color_1", "Editor", light_color_1);
theme->set_color("light_color_2", "Editor", light_color_2); 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 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); Color error_color = highlight_color.linear_interpolate(Color(1, .2, .2), 0.8);
theme->set_color("success_color", "Editor", success_color); 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_stylebox("SceneTabBG", "EditorStyles", make_empty_stylebox(6, 5, 6, 5));
theme->set_icon("close", "Tabs", title_hl_close_icon); 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", "HSeparator", make_line_stylebox(separator_color, border_width));
theme->set_stylebox("separator", "VSeparator", make_line_stylebox(separator_color, border_width, 0, true)); theme->set_stylebox("separator", "VSeparator", make_line_stylebox(separator_color, border_width, 0, true));
// Debugger // 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); theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger);
Ref<StyleBoxFlat> style_tab_fg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5); Ref<StyleBoxFlat> style_tab_fg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);

View file

@ -1737,7 +1737,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
file_list_vb->set_v_size_flags(SIZE_EXPAND_FILL); file_list_vb->set_v_size_flags(SIZE_EXPAND_FILL);
path_hb = memnew(HBoxContainer); path_hb = memnew(HBoxContainer);
path_hb->add_child(memnew(Control));
file_list_vb->add_child(path_hb); file_list_vb->add_child(path_hb);
button_back = memnew(ToolButton); button_back = memnew(ToolButton);

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 868 B

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

View file

@ -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>

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -1534,14 +1534,14 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);
input_base->add_child(vbc); input_base->add_child(vbc);
vbc->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 5); vbc->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 0);
vbc->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 5); vbc->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 0);
vbc->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); vbc->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 0);
vbc->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5); vbc->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 0);
l = memnew(Label); l = memnew(Label);
vbc->add_child(l); vbc->add_child(l);
l->set_position(Point2(6, 5)); l->set_position(Point2(6, 5) * EDSCALE);
l->set_text(TTR("Action:")); l->set_text(TTR("Action:"));
hbc = memnew(HBoxContainer); hbc = memnew(HBoxContainer);
@ -1632,6 +1632,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
//translations //translations
TabContainer *translations = memnew(TabContainer); TabContainer *translations = memnew(TabContainer);
translations->add_style_override("panel", memnew(StyleBoxEmpty));
translations->set_tab_align(TabContainer::ALIGN_LEFT); translations->set_tab_align(TabContainer::ALIGN_LEFT);
translations->set_name(TTR("Localization")); translations->set_name(TTR("Localization"));
tab_container->add_child(translations); tab_container->add_child(translations);
@ -1648,7 +1649,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
Button *addtr = memnew(Button(TTR("Add.."))); Button *addtr = memnew(Button(TTR("Add..")));
addtr->connect("pressed", this, "_translation_file_open"); addtr->connect("pressed", this, "_translation_file_open");
thb->add_child(addtr); thb->add_child(addtr);
MarginContainer *tmc = memnew(MarginContainer); VBoxContainer *tmc = memnew(VBoxContainer);
tvb->add_child(tmc); tvb->add_child(tmc);
tmc->set_v_size_flags(SIZE_EXPAND_FILL); tmc->set_v_size_flags(SIZE_EXPAND_FILL);
translation_list = memnew(Tree); translation_list = memnew(Tree);
@ -1672,7 +1673,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
Button *addtr = memnew(Button(TTR("Add.."))); Button *addtr = memnew(Button(TTR("Add..")));
addtr->connect("pressed", this, "_translation_res_file_open"); addtr->connect("pressed", this, "_translation_res_file_open");
thb->add_child(addtr); thb->add_child(addtr);
MarginContainer *tmc = memnew(MarginContainer); VBoxContainer *tmc = memnew(VBoxContainer);
tvb->add_child(tmc); tvb->add_child(tmc);
tmc->set_v_size_flags(SIZE_EXPAND_FILL); tmc->set_v_size_flags(SIZE_EXPAND_FILL);
translation_remap = memnew(Tree); translation_remap = memnew(Tree);
@ -1694,7 +1695,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
addtr->connect("pressed", this, "_translation_res_option_file_open"); addtr->connect("pressed", this, "_translation_res_option_file_open");
translation_res_option_add_button = addtr; translation_res_option_add_button = addtr;
thb->add_child(addtr); thb->add_child(addtr);
tmc = memnew(MarginContainer); tmc = memnew(VBoxContainer);
tvb->add_child(tmc); tvb->add_child(tmc);
tmc->set_v_size_flags(SIZE_EXPAND_FILL); tmc->set_v_size_flags(SIZE_EXPAND_FILL);
translation_remap_options = memnew(Tree); translation_remap_options = memnew(Tree);

View file

@ -45,7 +45,6 @@
#include "pair.h" #include "pair.h"
#include "print_string.h" #include "print_string.h"
#include "project_settings.h" #include "project_settings.h"
#include "project_settings.h"
#include "property_selector.h" #include "property_selector.h"
#include "scene/gui/label.h" #include "scene/gui/label.h"
#include "scene/main/viewport.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]; CheckBox *c = checks20[0];
c->set_text("True"); c->set_text("True");
checks20gc->set_position(Vector2(4, 4)); checks20gc->set_position(Vector2(4, 4) * EDSCALE);
c->set_pressed(v); c->set_pressed(v);
c->show(); c->show();
@ -434,14 +433,14 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} else if (hint == PROPERTY_HINT_EXP_EASING) { } 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_LEFT, ANCHOR_BEGIN, 5 * EDSCALE);
easing_draw->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5); easing_draw->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 5 * EDSCALE);
easing_draw->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 5); easing_draw->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 5 * EDSCALE);
easing_draw->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 30); easing_draw->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 30 * EDSCALE);
type_button->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 3); type_button->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 3 * EDSCALE);
type_button->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 3); type_button->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 3 * EDSCALE);
type_button->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, 25); type_button->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, 25 * EDSCALE);
type_button->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 7); type_button->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 7 * EDSCALE);
type_button->set_text(TTR("Preset..")); type_button->set_text(TTR("Preset.."));
type_button->get_popup()->clear(); type_button->get_popup()->clear();
type_button->get_popup()->add_item(TTR("Linear"), EASING_LINEAR); 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_TOP, ANCHOR_END);
action_buttons[0]->set_anchor(MARGIN_RIGHT, ANCHOR_END); action_buttons[0]->set_anchor(MARGIN_RIGHT, ANCHOR_END);
action_buttons[0]->set_anchor(MARGIN_BOTTOM, 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_end(Point2(margin, margin));
action_buttons[0]->set_text(TTR("Close")); action_buttons[0]->set_text(TTR("Close"));
action_buttons[0]->show(); action_buttons[0]->show();
@ -872,7 +871,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
break; break;
menu->clear(); 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>()) { 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); 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()) { 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("Del", "EditorIcons"), "Clear", OBJ_MENU_CLEAR);
menu->add_icon_item(get_icon("Duplicate", "EditorIcons"), "Make Unique", OBJ_MENU_MAKE_UNIQUE); menu->add_icon_item(get_icon("Duplicate", "EditorIcons"), "Make Unique", OBJ_MENU_MAKE_UNIQUE);
RES r = v; RES r = v;

View file

@ -185,19 +185,19 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
if (part_of_subscene) { if (part_of_subscene) {
//item->set_selectable(0,marked_selectable); //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)) { } else if (marked.has(p_node)) {
item->set_selectable(0, marked_selectable); 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) { } else if (!marked_selectable && !marked_children_selectable) {
Node *node = p_node; Node *node = p_node;
while (node) { while (node) {
if (marked.has(node)) { if (marked.has(node)) {
item->set_selectable(0, false); 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; break;
} }
node = node->get_parent(); node = node->get_parent();

View file

@ -637,7 +637,6 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
} else if (p_msg == "profile_sig") { } else if (p_msg == "profile_sig") {
//cache a signature //cache a signature
print_line("SIG: " + String(Variant(p_data)));
profiler_signature[p_data[1]] = p_data[0]; profiler_signature[p_data[1]] = p_data[0];
} else if (p_msg == "profile_frame" || p_msg == "profile_total") { } 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.position += graph_sb->get_offset();
r.size -= graph_sb->get_minimum_size(); r.size -= graph_sb->get_minimum_size();
int pi = which[i]; 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.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; 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); 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"); error_stack->connect("item_selected", this, "_error_stack_selected");
vmem_refresh->set_icon(get_icon("Reload", "EditorIcons")); vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
reason->add_color_override("font_color", get_color("error_color", "Editor"));
} break; } break;
case NOTIFICATION_PROCESS: { case NOTIFICATION_PROCESS: {
@ -1616,13 +1618,10 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
HBoxContainer *hbc = memnew(HBoxContainer); HBoxContainer *hbc = memnew(HBoxContainer);
vbc->add_child(hbc); vbc->add_child(hbc);
reason = memnew(LineEdit); reason = memnew(Label);
reason->set_text(""); reason->set_text("");
reason->set_editable(false);
hbc->add_child(reason); 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_h_size_flags(SIZE_EXPAND_FILL);
//reason->set_clip_text(true);
hbc->add_child(memnew(VSeparator)); hbc->add_child(memnew(VSeparator));
@ -1648,8 +1647,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
docontinue->set_tooltip(TTR("Continue")); docontinue->set_tooltip(TTR("Continue"));
docontinue->connect("pressed", this, "debug_continue"); docontinue->connect("pressed", this, "debug_continue");
//hbc->add_child( memnew( VSeparator) );
back = memnew(Button); back = memnew(Button);
hbc->add_child(back); hbc->add_child(back);
back->set_tooltip(TTR("Inspect Previous Instance")); back->set_tooltip(TTR("Inspect Previous Instance"));
@ -1691,10 +1688,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
breaked = false; breaked = false;
tabs->add_child(dbg); tabs->add_child(dbg);
//tabs->move_child(vbc,0);
hbc = memnew(HBoxContainer);
vbc->add_child(hbc);
} }
{ //errors { //errors
@ -1822,7 +1815,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
vmem_vb->add_child(vmem_hb); vmem_vb->add_child(vmem_hb);
vmem_refresh->connect("pressed", this, "_video_mem_request"); vmem_refresh->connect("pressed", this, "_video_mem_request");
MarginContainer *vmmc = memnew(MarginContainer); VBoxContainer *vmmc = memnew(VBoxContainer);
vmem_tree = memnew(Tree); vmem_tree = memnew(Tree);
vmem_tree->set_v_size_flags(SIZE_EXPAND_FILL); vmem_tree->set_v_size_flags(SIZE_EXPAND_FILL);
vmem_tree->set_h_size_flags(SIZE_EXPAND_FILL); vmem_tree->set_h_size_flags(SIZE_EXPAND_FILL);

View file

@ -89,7 +89,7 @@ class ScriptEditorDebugger : public Control {
TabContainer *tabs; TabContainer *tabs;
LineEdit *reason; Label *reason;
ScriptEditorDebuggerVariables *variables; ScriptEditorDebuggerVariables *variables;
Button *step; Button *step;