diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-03-12 09:37:40 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-03-26 15:49:42 +0100 |
commit | 441f1a5fe9a3bf0e4e5dab578f793500b1ff6e3d (patch) | |
tree | 6421bcc3235e6fdcd726244ac7d455886e17734b /editor/plugins/curve_editor_plugin.cpp | |
parent | 543fb1c4dadd75914d595b089820aef42e691075 (diff) |
Popups are now windows also (broken!)
Diffstat (limited to 'editor/plugins/curve_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/curve_editor_plugin.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 2724da0a85..0fd8ea4fb5 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -511,7 +511,7 @@ void CurveEditor::set_hover_point_index(int index) { } void CurveEditor::update_view_transform() { - Ref<Font> font = get_font("font", "Label"); + Ref<Font> font = get_theme_font("font", "Label"); const real_t margin = font->get_height() + 2 * EDSCALE; float min_y = 0; @@ -626,7 +626,7 @@ void CurveEditor::_draw() { // Background Vector2 view_size = get_rect().size; - draw_style_box(get_stylebox("bg", "Tree"), Rect2(Point2(), view_size)); + draw_style_box(get_theme_stylebox("bg", "Tree"), Rect2(Point2(), view_size)); // Grid @@ -635,8 +635,8 @@ void CurveEditor::_draw() { Vector2 min_edge = get_world_pos(Vector2(0, view_size.y)); Vector2 max_edge = get_world_pos(Vector2(view_size.x, 0)); - const Color grid_color0 = get_color("mono_color", "Editor") * Color(1, 1, 1, 0.15); - const Color grid_color1 = get_color("mono_color", "Editor") * Color(1, 1, 1, 0.07); + const Color grid_color0 = get_theme_color("mono_color", "Editor") * Color(1, 1, 1, 0.15); + const Color grid_color1 = get_theme_color("mono_color", "Editor") * Color(1, 1, 1, 0.07); draw_line(Vector2(min_edge.x, curve.get_min_value()), Vector2(max_edge.x, curve.get_min_value()), grid_color0); draw_line(Vector2(max_edge.x, curve.get_max_value()), Vector2(min_edge.x, curve.get_max_value()), grid_color0); draw_line(Vector2(0, min_edge.y), Vector2(0, max_edge.y), grid_color0); @@ -656,9 +656,9 @@ void CurveEditor::_draw() { draw_set_transform_matrix(Transform2D()); - Ref<Font> font = get_font("font", "Label"); + Ref<Font> font = get_theme_font("font", "Label"); float font_height = font->get_height(); - Color text_color = get_color("font_color", "Editor"); + Color text_color = get_theme_color("font_color", "Editor"); { // X axis @@ -686,7 +686,7 @@ void CurveEditor::_draw() { if (_selected_point >= 0) { - const Color tangent_color = get_color("accent_color", "Editor"); + const Color tangent_color = get_theme_color("accent_color", "Editor"); int i = _selected_point; Vector2 pos = curve.get_point_position(i); @@ -708,8 +708,8 @@ void CurveEditor::_draw() { draw_set_transform_matrix(_world_to_view); - const Color line_color = get_color("font_color", "Editor"); - const Color edge_line_color = get_color("highlight_color", "Editor"); + const Color line_color = get_theme_color("font_color", "Editor"); + const Color edge_line_color = get_theme_color("highlight_color", "Editor"); CanvasItemPlotCurve plot_func(*this, line_color, edge_line_color); plot_curve_accurate(curve, 4.f / view_size.x, plot_func); @@ -718,8 +718,8 @@ void CurveEditor::_draw() { draw_set_transform_matrix(Transform2D()); - const Color point_color = get_color("font_color", "Editor"); - const Color selected_point_color = get_color("accent_color", "Editor"); + const Color point_color = get_theme_color("font_color", "Editor"); + const Color selected_point_color = get_theme_color("accent_color", "Editor"); for (int i = 0; i < curve.get_point_count(); ++i) { Vector2 pos = curve.get_point_position(i); |