Skip to content

Commit

Permalink
Add new customizable default theme for PixelEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
WhalesState committed Dec 19, 2024
1 parent aa5b6c7 commit d7aa6c2
Show file tree
Hide file tree
Showing 84 changed files with 2,179 additions and 80 deletions.
2 changes: 2 additions & 0 deletions scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,11 @@ void Control::_validate_property(PropertyInfo &p_property) const {
// Only the default theme and the project theme are used for the list of options.
// This is an imposed limitation to simplify the logic needed to leverage those options.
ThemeDB::get_singleton()->get_default_theme()->get_type_variation_list(get_class_name(), &names);
#ifndef PIXEL_ENGINE
if (ThemeDB::get_singleton()->get_project_theme().is_valid()) {
ThemeDB::get_singleton()->get_project_theme()->get_type_variation_list(get_class_name(), &names);
}
#endif // !PIXEL_ENGINE
names.sort_custom<StringName::AlphCompare>();

Vector<StringName> unique_names;
Expand Down
7 changes: 6 additions & 1 deletion scene/theme/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ Import("env")

import default_theme_builders

env.add_source_files(env.scene_sources, "*.cpp")
env.add_source_files(env.scene_sources, ["theme_db.cpp", "theme_owner.cpp"])

if env.pixel_engine:
env.add_source_files(env.scene_sources, "pixel_default_theme.cpp")
else:
env.add_source_files(env.scene_sources, "default_theme.cpp")

SConscript("icons/SCsub")

Expand Down
1 change: 0 additions & 1 deletion scene/theme/icons/SCsub
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from misc.utility.scons_hints import *

Import("env")

Expand Down
2 changes: 1 addition & 1 deletion scene/theme/icons/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/arrow_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/arrow_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/arrow_right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/bookmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/breakpoint.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/checked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/checked_disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/close_hl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/color_picker_bar_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/color_picker_cursor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scene/theme/icons/color_picker_cursor_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scene/theme/icons/color_picker_hex.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scene/theme/icons/color_picker_hex_code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/color_picker_overbright.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/color_picker_pipette.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/error_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/folder_create.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/folder_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/graph_port.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/grid_layout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/grid_minimap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scene/theme/icons/grid_snap.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/grid_toggle.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/hslider_tick.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/indeterminate.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/indeterminate_disabled.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/line_edit_clear.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/mini_checkerboard.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/option_button_arrow.svg
2 changes: 1 addition & 1 deletion scene/theme/icons/picker_shape_circle.svg
Loading

0 comments on commit d7aa6c2

Please sign in to comment.