Skip to content

Commit e767ff5

Browse files
committed
Add project tags
1 parent 72f7131 commit e767ff5

File tree

4 files changed

+409
-17
lines changed

4 files changed

+409
-17
lines changed

core/config/project_settings.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,7 @@ ProjectSettings::ProjectSettings() {
12511251
GLOBAL_DEF_BASIC("application/config/name", "");
12521252
GLOBAL_DEF_BASIC(PropertyInfo(Variant::DICTIONARY, "application/config/name_localized", PROPERTY_HINT_LOCALIZABLE_STRING), Dictionary());
12531253
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "application/config/description", PROPERTY_HINT_MULTILINE_TEXT), "");
1254+
GLOBAL_DEF_INTERNAL(PropertyInfo(Variant::STRING, "application/config/tags"), PackedStringArray());
12541255
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "application/run/main_scene", PROPERTY_HINT_FILE, "*.tscn,*.scn,*.res"), "");
12551256
GLOBAL_DEF("application/run/disable_stdout", false);
12561257
GLOBAL_DEF("application/run/disable_stderr", false);

editor/editor_themes.cpp

+27
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,33 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
939939
editor_log_button_pressed->set_border_color(accent_color);
940940
theme->set_stylebox("pressed", "EditorLogFilterButton", editor_log_button_pressed);
941941

942+
// ProjectTag
943+
{
944+
theme->set_type_variation("ProjectTag", "Button");
945+
946+
Ref<StyleBoxFlat> tag = style_widget->duplicate();
947+
tag->set_bg_color(dark_theme ? tag->get_bg_color().lightened(0.2) : tag->get_bg_color().darkened(0.2));
948+
tag->set_corner_radius(CORNER_TOP_LEFT, 0);
949+
tag->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
950+
tag->set_corner_radius(CORNER_TOP_RIGHT, 4);
951+
tag->set_corner_radius(CORNER_BOTTOM_RIGHT, 4);
952+
theme->set_stylebox("normal", "ProjectTag", tag);
953+
954+
tag = style_widget_hover->duplicate();
955+
tag->set_corner_radius(CORNER_TOP_LEFT, 0);
956+
tag->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
957+
tag->set_corner_radius(CORNER_TOP_RIGHT, 4);
958+
tag->set_corner_radius(CORNER_BOTTOM_RIGHT, 4);
959+
theme->set_stylebox("hover", "ProjectTag", tag);
960+
961+
tag = style_widget_pressed->duplicate();
962+
tag->set_corner_radius(CORNER_TOP_LEFT, 0);
963+
tag->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
964+
tag->set_corner_radius(CORNER_TOP_RIGHT, 4);
965+
tag->set_corner_radius(CORNER_BOTTOM_RIGHT, 4);
966+
theme->set_stylebox("pressed", "ProjectTag", tag);
967+
}
968+
942969
// MenuBar
943970
theme->set_stylebox("normal", "MenuBar", style_widget);
944971
theme->set_stylebox("hover", "MenuBar", style_widget_hover);

0 commit comments

Comments
 (0)