You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-04 17:04:49 +00:00
Merge pull request #112659 from passivestar/ruler-visibility-fix
Fix 2D ruler visibility in modern theme
This commit is contained in:
@@ -3170,10 +3170,10 @@ void CanvasItemEditor::_draw_smart_snapping() {
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_draw_rulers() {
|
||||
Color bg_color = get_theme_color(SNAME("dark_color_2"), EditorStringName(Editor));
|
||||
Color bg_color = get_theme_color(SNAME("ruler_color"), EditorStringName(Editor));
|
||||
Color graduation_color = get_theme_color(SceneStringName(font_color), EditorStringName(Editor)).lerp(bg_color, 0.5);
|
||||
Color font_color = get_theme_color(SceneStringName(font_color), EditorStringName(Editor));
|
||||
font_color.a = 0.8;
|
||||
font_color.a = 0.9;
|
||||
Ref<Font> font = get_theme_font(SNAME("rulers"), EditorStringName(EditorFonts));
|
||||
real_t ruler_tick_scale = ruler_width_scaled / 15.0;
|
||||
const String lang = _get_locale();
|
||||
|
||||
@@ -86,6 +86,7 @@ void ThemeClassic::populate_shared_styles(const Ref<EditorTheme> &p_theme, Edito
|
||||
p_theme->set_color("success_color", EditorStringName(Editor), p_config.success_color);
|
||||
p_theme->set_color("warning_color", EditorStringName(Editor), p_config.warning_color);
|
||||
p_theme->set_color("error_color", EditorStringName(Editor), p_config.error_color);
|
||||
p_theme->set_color("ruler_color", EditorStringName(Editor), p_config.dark_color_2);
|
||||
#ifndef DISABLE_DEPRECATED // Used before 4.3.
|
||||
p_theme->set_color("disabled_highlight_color", EditorStringName(Editor), p_config.highlight_disabled_color);
|
||||
#endif
|
||||
|
||||
@@ -97,6 +97,7 @@ void ThemeModern::populate_shared_styles(const Ref<EditorTheme> &p_theme, Editor
|
||||
p_theme->set_color("success_color", EditorStringName(Editor), p_config.success_color);
|
||||
p_theme->set_color("warning_color", EditorStringName(Editor), p_config.warning_color);
|
||||
p_theme->set_color("error_color", EditorStringName(Editor), p_config.error_color);
|
||||
p_theme->set_color("ruler_color", EditorStringName(Editor), p_config.base_color.lerp(p_config.mono_color_inv, 0.3) * Color(1, 1, 1, 0.8));
|
||||
#ifndef DISABLE_DEPRECATED // Used before 4.3.
|
||||
p_theme->set_color("disabled_highlight_color", EditorStringName(Editor), p_config.highlight_disabled_color);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user