You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Popups are now windows also (broken!)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user