You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Improve editor theme generation after the refactor
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "editor/import/3d/post_import_plugin_skeleton_track_organizer.h"
|
||||
#include "editor/import/3d/scene_import_settings.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "editor/themes/editor_theme_manager.h"
|
||||
#include "scene/gui/aspect_ratio_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/texture_rect.h"
|
||||
@@ -52,7 +53,7 @@ void BoneMapperButton::fetch_textures() {
|
||||
set_offset(SIDE_BOTTOM, 0);
|
||||
|
||||
// Hack to avoid handle color darkening...
|
||||
set_modulate(EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25));
|
||||
set_modulate(EditorThemeManager::is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25));
|
||||
|
||||
circle = memnew(TextureRect);
|
||||
circle->set_texture(get_editor_theme_icon(SNAME("BoneMapperHandleCircle")));
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "editor/plugins/script_editor_plugin.h"
|
||||
#include "editor/scene_tree_dock.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "editor/themes/editor_theme_manager.h"
|
||||
#include "scene/2d/polygon_2d.h"
|
||||
#include "scene/2d/skeleton_2d.h"
|
||||
#include "scene/2d/sprite_2d.h"
|
||||
@@ -3898,7 +3899,7 @@ void CanvasItemEditor::_update_editor_settings() {
|
||||
// to distinguish from the other key icons at the top. On a light theme,
|
||||
// the icon will be dark, so we need to lighten it before blending it
|
||||
// with the red color.
|
||||
const Color key_auto_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25);
|
||||
const Color key_auto_color = EditorThemeManager::is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25);
|
||||
key_auto_insert_button->add_theme_color_override("icon_pressed_color", key_auto_color.lerp(Color(1, 0, 0), 0.55));
|
||||
animation_menu->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/gui/editor_spin_slider.h"
|
||||
#include "editor/themes/editor_theme_manager.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/label.h"
|
||||
@@ -352,7 +353,7 @@ void ParticleProcessMaterialMinMaxPropertyEditor::_notification(int p_what) {
|
||||
min_edit->add_theme_color_override(SNAME("label_color"), get_theme_color(SNAME("property_color_x"), EditorStringName(Editor)));
|
||||
max_edit->add_theme_color_override(SNAME("label_color"), get_theme_color(SNAME("property_color_y"), EditorStringName(Editor)));
|
||||
|
||||
const bool dark_theme = EditorSettings::get_singleton()->is_dark_theme();
|
||||
const bool dark_theme = EditorThemeManager::is_dark_theme();
|
||||
const Color accent_color = get_theme_color(SNAME("accent_color"), EditorStringName(Editor));
|
||||
background_color = dark_theme ? Color(0.3, 0.3, 0.3) : Color(0.7, 0.7, 0.7);
|
||||
normal_color = dark_theme ? Color(0.5, 0.5, 0.5) : Color(0.8, 0.8, 0.8);
|
||||
|
||||
Reference in New Issue
Block a user