Преглед на файлове

Improve the default project theme

The new default project theme uses StyleBoxFlat extensively for
a more modern design and better scalability to multiple resolutions.

SVG icons are now used in place of PNG icons. While this does not
allow for true vector-based icon drawing (icons are still rasterized
at load-time), this makes the design work easier for contributors
and opens the door to vector drawing in the future (e.g. with polygons
or SDFs).

Like for editor icons, the SVG header file is now built automatically
when a SVG file is changed. This removing the need for running
`make_header.py` manually (TODO).

The "Use Hidpi" project setting has been removed in favor of a
"Default Theme Scale" project setting, which allows creating the
default theme at a higher/lower scale than the default.
This can be used when designing GUIs with a high base resolution
to ensure crisp visuals.

Co-authored-by: Yuri Sizov <[email protected]>
Hugo Locurcio преди 3 години
родител
ревизия
84a69d7429
променени са 100 файла, в които са добавени 548 реда и са изтрити 476 реда
  1. 4 4
      doc/classes/Button.xml
  2. 4 4
      doc/classes/CheckBox.xml
  3. 4 4
      doc/classes/CheckButton.xml
  4. 4 4
      doc/classes/CodeEdit.xml
  5. 7 11
      doc/classes/GraphNode.xml
  6. 0 2
      doc/classes/HSplitContainer.xml
  7. 1 1
      doc/classes/ItemList.xml
  8. 6 6
      doc/classes/LineEdit.xml
  9. 3 3
      doc/classes/LinkButton.xml
  10. 3 3
      doc/classes/MenuButton.xml
  11. 5 5
      doc/classes/OptionButton.xml
  12. 3 3
      doc/classes/PopupMenu.xml
  13. 1 1
      doc/classes/ProgressBar.xml
  14. 1 2
      doc/classes/ProjectSettings.xml
  15. 3 3
      doc/classes/TabBar.xml
  16. 3 3
      doc/classes/TabContainer.xml
  17. 6 6
      doc/classes/TextEdit.xml
  18. 5 5
      doc/classes/Tree.xml
  19. 0 2
      doc/classes/VSplitContainer.xml
  20. 3 3
      doc/classes/Window.xml
  21. 1 0
      editor/editor_themes.cpp
  22. 1 1
      editor/icons/editor_icons_builders.py
  23. 0 2
      misc/scripts/clang_format.sh
  24. 0 1
      scene/gui/gradient_edit.h
  25. 4 3
      scene/register_scene_types.cpp
  26. 17 0
      scene/resources/default_theme/SCsub
  27. 1 0
      scene/resources/default_theme/add.svg
  28. BIN
      scene/resources/default_theme/arrow_down.png
  29. 1 0
      scene/resources/default_theme/arrow_down.svg
  30. BIN
      scene/resources/default_theme/arrow_left.png
  31. 1 0
      scene/resources/default_theme/arrow_left.svg
  32. BIN
      scene/resources/default_theme/arrow_right.png
  33. 1 0
      scene/resources/default_theme/arrow_right.svg
  34. BIN
      scene/resources/default_theme/bar_arrow.png
  35. BIN
      scene/resources/default_theme/bookmark.png
  36. 1 0
      scene/resources/default_theme/bookmark.svg
  37. 1 0
      scene/resources/default_theme/breakpoint.svg
  38. BIN
      scene/resources/default_theme/button_disabled.png
  39. BIN
      scene/resources/default_theme/button_focus.png
  40. BIN
      scene/resources/default_theme/button_hover.png
  41. BIN
      scene/resources/default_theme/button_normal.png
  42. BIN
      scene/resources/default_theme/button_pressed.png
  43. BIN
      scene/resources/default_theme/checked.png
  44. 1 0
      scene/resources/default_theme/checked.svg
  45. BIN
      scene/resources/default_theme/checked_disabled.png
  46. 1 0
      scene/resources/default_theme/checked_disabled.svg
  47. BIN
      scene/resources/default_theme/checker_bg.png
  48. BIN
      scene/resources/default_theme/close.png
  49. 1 0
      scene/resources/default_theme/close.svg
  50. BIN
      scene/resources/default_theme/close_hl.png
  51. 1 0
      scene/resources/default_theme/close_hl.svg
  52. 1 0
      scene/resources/default_theme/color_picker_bar_arrow.svg
  53. 1 0
      scene/resources/default_theme/color_picker_cursor.svg
  54. BIN
      scene/resources/default_theme/color_picker_hue.png
  55. 1 0
      scene/resources/default_theme/color_picker_hue.svg
  56. 1 0
      scene/resources/default_theme/color_picker_overbright.svg
  57. 1 0
      scene/resources/default_theme/color_picker_pipette.svg
  58. BIN
      scene/resources/default_theme/color_picker_sample.png
  59. 0 0
      scene/resources/default_theme/color_picker_sample.svg
  60. 354 354
      scene/resources/default_theme/default_theme.cpp
  61. 2 2
      scene/resources/default_theme/default_theme.h
  62. 78 0
      scene/resources/default_theme/default_theme_icons_builders.py
  63. BIN
      scene/resources/default_theme/dialog_bg.png
  64. BIN
      scene/resources/default_theme/dropdown.png
  65. BIN
      scene/resources/default_theme/ellipsis.png
  66. BIN
      scene/resources/default_theme/error_icon.png
  67. 1 0
      scene/resources/default_theme/error_icon.svg
  68. 0 38
      scene/resources/default_theme/error_icon.xpm
  69. 1 0
      scene/resources/default_theme/file.svg
  70. BIN
      scene/resources/default_theme/focus.png
  71. 1 0
      scene/resources/default_theme/folder.svg
  72. 1 0
      scene/resources/default_theme/folder_up.svg
  73. BIN
      scene/resources/default_theme/graph_node.png
  74. BIN
      scene/resources/default_theme/graph_node_breakpoint.png
  75. BIN
      scene/resources/default_theme/graph_node_close.png
  76. BIN
      scene/resources/default_theme/graph_node_comment.png
  77. BIN
      scene/resources/default_theme/graph_node_comment_focus.png
  78. BIN
      scene/resources/default_theme/graph_node_default.png
  79. BIN
      scene/resources/default_theme/graph_node_default_focus.png
  80. BIN
      scene/resources/default_theme/graph_node_position.png
  81. BIN
      scene/resources/default_theme/graph_node_selected.png
  82. BIN
      scene/resources/default_theme/graph_port.png
  83. 1 0
      scene/resources/default_theme/graph_port.svg
  84. 1 0
      scene/resources/default_theme/grid_layout.svg
  85. 1 0
      scene/resources/default_theme/grid_minimap.svg
  86. 1 0
      scene/resources/default_theme/grid_snap.svg
  87. BIN
      scene/resources/default_theme/hseparator.png
  88. BIN
      scene/resources/default_theme/hslider_bg.png
  89. BIN
      scene/resources/default_theme/hslider_grabber.png
  90. BIN
      scene/resources/default_theme/hslider_grabber_disabled.png
  91. BIN
      scene/resources/default_theme/hslider_grabber_hl.png
  92. BIN
      scene/resources/default_theme/hslider_tick.png
  93. 1 0
      scene/resources/default_theme/hslider_tick.svg
  94. BIN
      scene/resources/default_theme/hsplit_bg.png
  95. BIN
      scene/resources/default_theme/hsplitter.png
  96. 1 0
      scene/resources/default_theme/hsplitter.svg
  97. BIN
      scene/resources/default_theme/icon_add.png
  98. BIN
      scene/resources/default_theme/icon_close.png
  99. BIN
      scene/resources/default_theme/icon_color_pick.png
  100. BIN
      scene/resources/default_theme/icon_file.png

+ 4 - 4
doc/classes/Button.xml

@@ -94,16 +94,16 @@
 		</member>
 	</members>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Default text [Color] of the [Button].
 		</theme_item>
-		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			Text [Color] used when the [Button] is disabled.
 		</theme_item>
-		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [Button] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
 		</theme_item>
-		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [Button] is being hovered.
 		</theme_item>
 		<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">

+ 4 - 4
doc/classes/CheckBox.xml

@@ -14,16 +14,16 @@
 		<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
 	</members>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			The [CheckBox] text's font color.
 		</theme_item>
-		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			The [CheckBox] text's font color when it's disabled.
 		</theme_item>
-		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			The [CheckBox] text's font color when it's focused. Only replaces the normal text color of the checkbox. Disabled, hovered, and pressed states take precedence over this color.
 		</theme_item>
-		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			The [CheckBox] text's font color when it's hovered.
 		</theme_item>
 		<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">

+ 4 - 4
doc/classes/CheckButton.xml

@@ -14,16 +14,16 @@
 		<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
 	</members>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			The [CheckButton] text's font color.
 		</theme_item>
-		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			The [CheckButton] text's font color when it's disabled.
 		</theme_item>
-		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			The [CheckButton] text's font color when it's focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
 		</theme_item>
-		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			The [CheckButton] text's font color when it's hovered.
 		</theme_item>
 		<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">

+ 4 - 4
doc/classes/CodeEdit.xml

@@ -574,7 +574,7 @@
 		<theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
 			[Color] of the text behind the caret when block caret is enabled.
 		</theme_item>
-		<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			[Color] of the caret.
 		</theme_item>
 		<theme_item name="code_folding_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)">
@@ -601,13 +601,13 @@
 		<theme_item name="executing_line_color" data_type="color" type="Color" default="Color(0.98, 0.89, 0.27, 1)">
 			[Color] of the executing icon for executing lines.
 		</theme_item>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Sets the font [Color].
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			The tint of text outline of the [CodeEdit].
 		</theme_item>
-		<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+		<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			Sets the font [Color] when [member TextEdit.editable] is disabled.
 		</theme_item>
 		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
@@ -625,7 +625,7 @@
 		<theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
 			[Color] behind the text that matches the search query.
 		</theme_item>
-		<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+		<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
 			Sets the highlight [Color] of text selections.
 		</theme_item>
 		<theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">

+ 7 - 11
doc/classes/GraphNode.xml

@@ -292,25 +292,25 @@
 		</constant>
 	</constants>
 	<theme_items>
-		<theme_item name="close_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+		<theme_item name="close_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			The color modulation applied to the close button icon.
 		</theme_item>
-		<theme_item name="resizer_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+		<theme_item name="resizer_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			The color modulation applied to the resizer icon.
 		</theme_item>
-		<theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+		<theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Color of the title text.
 		</theme_item>
-		<theme_item name="close_offset" data_type="constant" type="int" default="18">
+		<theme_item name="close_offset" data_type="constant" type="int" default="22">
 			The vertical offset of the close button.
 		</theme_item>
-		<theme_item name="port_offset" data_type="constant" type="int" default="3">
+		<theme_item name="port_offset" data_type="constant" type="int" default="0">
 			Horizontal offset for the ports.
 		</theme_item>
-		<theme_item name="separation" data_type="constant" type="int" default="1">
+		<theme_item name="separation" data_type="constant" type="int" default="2">
 			The vertical distance between ports.
 		</theme_item>
-		<theme_item name="title_offset" data_type="constant" type="int" default="20">
+		<theme_item name="title_offset" data_type="constant" type="int" default="26">
 			Vertical offset of the title text.
 		</theme_item>
 		<theme_item name="title_font" data_type="font" type="Font">
@@ -334,10 +334,6 @@
 		<theme_item name="commentfocus" data_type="style" type="StyleBox">
 			The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused.
 		</theme_item>
-		<theme_item name="defaultfocus" data_type="style" type="StyleBox">
-		</theme_item>
-		<theme_item name="defaultframe" data_type="style" type="StyleBox">
-		</theme_item>
 		<theme_item name="frame" data_type="style" type="StyleBox">
 			The default background for [GraphNode].
 		</theme_item>

+ 0 - 2
doc/classes/HSplitContainer.xml

@@ -18,7 +18,5 @@
 		<theme_item name="grabber" data_type="icon" type="Texture2D">
 			The icon used for the grabber drawn in the middle area.
 		</theme_item>
-		<theme_item name="bg" data_type="style" type="StyleBox">
-		</theme_item>
 	</theme_items>
 </class>

+ 1 - 1
doc/classes/ItemList.xml

@@ -463,7 +463,7 @@
 		</constant>
 	</constants>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.63, 0.63, 0.63, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.65, 0.65, 0.65, 1)">
 			Default text [Color] of the item.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">

+ 6 - 6
doc/classes/LineEdit.xml

@@ -382,28 +382,28 @@
 		</constant>
 	</constants>
 	<theme_items>
-		<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Color of the [LineEdit]'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely.
 		</theme_item>
-		<theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Color used as default tint for the clear button.
 		</theme_item>
 		<theme_item name="clear_button_color_pressed" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			Color used for the clear button when it's pressed.
 		</theme_item>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Default font color.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			The tint of text outline of the [LineEdit].
 		</theme_item>
-		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			Font color for selected text (inside the selection rectangle).
 		</theme_item>
-		<theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+		<theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			Font color when editing is disabled.
 		</theme_item>
-		<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+		<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
 			Color of the selection rectangle.
 		</theme_item>
 		<theme_item name="caret_width" data_type="constant" type="int" default="1">

+ 3 - 3
doc/classes/LinkButton.xml

@@ -66,13 +66,13 @@
 		</constant>
 	</constants>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Default text [Color] of the [LinkButton].
 		</theme_item>
-		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [LinkButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
 		</theme_item>
-		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [LinkButton] is being hovered.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">

+ 3 - 3
doc/classes/MenuButton.xml

@@ -46,16 +46,16 @@
 		</signal>
 	</signals>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Default text [Color] of the [MenuButton].
 		</theme_item>
 		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
 			Text [Color] used when the [MenuButton] is disabled.
 		</theme_item>
-		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [MenuButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
 		</theme_item>
-		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [MenuButton] is being hovered.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">

+ 5 - 5
doc/classes/OptionButton.xml

@@ -182,16 +182,16 @@
 		</signal>
 	</signals>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Default text [Color] of the [OptionButton].
 		</theme_item>
-		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			Text [Color] used when the [OptionButton] is disabled.
 		</theme_item>
-		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [OptionButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
 		</theme_item>
-		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] used when the [OptionButton] is being hovered.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -200,7 +200,7 @@
 		<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			Text [Color] used when the [OptionButton] is being pressed.
 		</theme_item>
-		<theme_item name="arrow_margin" data_type="constant" type="int" default="2">
+		<theme_item name="arrow_margin" data_type="constant" type="int" default="4">
 			The horizontal space between the arrow icon and the right edge of the button.
 		</theme_item>
 		<theme_item name="hseparation" data_type="constant" type="int" default="2">

+ 3 - 3
doc/classes/PopupMenu.xml

@@ -538,19 +538,19 @@
 		<theme_item name="font_accelerator_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)">
 			The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
 		</theme_item>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			The default text [Color] for menu items' names.
 		</theme_item>
 		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)">
 			[Color] used for disabled menu items' text.
 		</theme_item>
-		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			[Color] used for the hovered text.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			The tint of text outline of the menu item.
 		</theme_item>
-		<theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			[Color] used for labeled separators' text. See [method add_separator].
 		</theme_item>
 		<theme_item name="hseparation" data_type="constant" type="int" default="4">

+ 1 - 1
doc/classes/ProgressBar.xml

@@ -16,7 +16,7 @@
 		<member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.01" />
 	</members>
 	<theme_items>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			The color of the text.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">

+ 1 - 2
doc/classes/ProjectSettings.xml

@@ -562,8 +562,7 @@
 		<member name="gui/theme/custom_font" type="String" setter="" getter="" default="&quot;&quot;">
 			Path to a custom [Font] resource to use as default for all GUI elements of the project.
 		</member>
-		<member name="gui/theme/use_hidpi" type="bool" setter="" getter="" default="false">
-			If [code]true[/code], makes sure the theme used works with HiDPI.
+		<member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0">
 		</member>
 		<member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000">
 			Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds).

+ 3 - 3
doc/classes/TabBar.xml

@@ -282,16 +282,16 @@
 		</constant>
 	</constants>
 	<theme_items>
-		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			Font color of disabled tabs.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			The tint of text outline of the tab name.
 		</theme_item>
-		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Font color of the currently selected tab.
 		</theme_item>
-		<theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+		<theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
 			Font color of the other, unselected tabs.
 		</theme_item>
 		<theme_item name="hseparation" data_type="constant" type="int" default="4">

+ 3 - 3
doc/classes/TabContainer.xml

@@ -178,16 +178,16 @@
 		</constant>
 	</constants>
 	<theme_items>
-		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
+		<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			Font color of disabled tabs.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			The tint of text outline of the tab name.
 		</theme_item>
-		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Font color of the currently selected tab.
 		</theme_item>
-		<theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+		<theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
 			Font color of the other, unselected tabs.
 		</theme_item>
 		<theme_item name="icon_separation" data_type="constant" type="int" default="4">

+ 6 - 6
doc/classes/TextEdit.xml

@@ -1222,22 +1222,22 @@
 		<theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
 			[Color] of the text behind the caret when using a block caret.
 		</theme_item>
-		<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			[Color] of the caret. This can be set to a fully transparent color to hide the caret entirely.
 		</theme_item>
 		<theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
 			Background [Color] of the line containing the caret.
 		</theme_item>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Sets the font [Color].
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			The tint of text outline of the [TextEdit].
 		</theme_item>
-		<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
+		<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
 			Sets the font [Color] when [member editable] is disabled.
 		</theme_item>
-		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
 		</theme_item>
 		<theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
@@ -1246,10 +1246,10 @@
 		<theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
 			[Color] behind the text that matches the search query.
 		</theme_item>
-		<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+		<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
 			Sets the highlight [Color] of text selections.
 		</theme_item>
-		<theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
+		<theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 0.25)">
 			Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
 		</theme_item>
 		<theme_item name="caret_width" data_type="constant" type="int" default="1">

+ 5 - 5
doc/classes/Tree.xml

@@ -467,13 +467,13 @@
 		<theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
 			The [Color] of the relationship lines between the selected [TreeItem] and its children.
 		</theme_item>
-		<theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
+		<theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
 			Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
 		</theme_item>
 		<theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 0.3, 0.2, 1)">
 			[Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
 		</theme_item>
-		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
+		<theme_item name="font_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
 			Default text [Color] of the item.
 		</theme_item>
 		<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
@@ -482,7 +482,7 @@
 		<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			Text [Color] used when the item is selected.
 		</theme_item>
-		<theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)">
+		<theme_item name="guide_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.25)">
 			[Color] of the guideline.
 		</theme_item>
 		<theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
@@ -491,7 +491,7 @@
 		<theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
 			The default [Color] of the relationship lines.
 		</theme_item>
-		<theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+		<theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 			Default text [Color] of the title button.
 		</theme_item>
 		<theme_item name="button_margin" data_type="constant" type="int" default="4">
@@ -509,7 +509,7 @@
 		<theme_item name="hseparation" data_type="constant" type="int" default="4">
 			The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
 		</theme_item>
-		<theme_item name="item_margin" data_type="constant" type="int" default="12">
+		<theme_item name="item_margin" data_type="constant" type="int" default="16">
 			The horizontal margin at the start of an item. This is used when folding is enabled for the item.
 		</theme_item>
 		<theme_item name="outline_size" data_type="constant" type="int" default="0">

+ 0 - 2
doc/classes/VSplitContainer.xml

@@ -18,7 +18,5 @@
 		<theme_item name="grabber" data_type="icon" type="Texture2D">
 			The icon used for the grabber drawn in the middle area.
 		</theme_item>
-		<theme_item name="bg" data_type="style" type="StyleBox">
-		</theme_item>
 	</theme_items>
 </class>

+ 3 - 3
doc/classes/Window.xml

@@ -443,20 +443,20 @@
 		</constant>
 	</constants>
 	<theme_items>
-		<theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+		<theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
 		</theme_item>
 		<theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
 			The color of the title outline.
 		</theme_item>
 		<theme_item name="close_h_ofs" data_type="constant" type="int" default="18">
 		</theme_item>
-		<theme_item name="close_v_ofs" data_type="constant" type="int" default="18">
+		<theme_item name="close_v_ofs" data_type="constant" type="int" default="24">
 		</theme_item>
 		<theme_item name="resize_margin" data_type="constant" type="int" default="4">
 		</theme_item>
 		<theme_item name="scaleborder_size" data_type="constant" type="int" default="4">
 		</theme_item>
-		<theme_item name="title_height" data_type="constant" type="int" default="20">
+		<theme_item name="title_height" data_type="constant" type="int" default="36">
 		</theme_item>
 		<theme_item name="title_outline_size" data_type="constant" type="int" default="0">
 			The size of the title outline.

+ 1 - 0
editor/editor_themes.cpp

@@ -112,6 +112,7 @@ static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false,
 }
 
 #ifdef MODULE_SVG_ENABLED
+// See also `generate_icon()` in `scene/resources/default_theme.cpp`.
 static Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float p_scale = EDSCALE, float p_saturation = 1.0, Dictionary p_convert_colors = Dictionary()) {
 	Ref<ImageTexture> icon = memnew(ImageTexture);
 	Ref<Image> img = memnew(Image);

+ 1 - 1
editor/icons/editor_icons_builders.py

@@ -8,7 +8,7 @@ import os
 from io import StringIO
 from platform_methods import subprocess_main
 
-
+# See also `scene/resources/default_theme/default_theme_icons_builders.py`.
 def make_editor_icons_action(target, source, env):
 
     dst = target[0]

+ 0 - 2
misc/scripts/clang_format.sh

@@ -29,8 +29,6 @@ while IFS= read -rd '' f; do
                 continue 2
             elif [[ "$f" == *"glsl" ]]; then
                 continue 2
-            elif [[ "$f" == *"theme_data.h" ]]; then
-                continue 2
             elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/input/InputManager"* ]]; then
                 continue 2
             fi

+ 0 - 1
scene/gui/gradient_edit.h

@@ -33,7 +33,6 @@
 
 #include "scene/gui/color_picker.h"
 #include "scene/gui/popup.h"
-#include "scene/resources/default_theme/theme_data.h"
 #include "scene/resources/gradient.h"
 
 class GradientEdit : public Control {

+ 4 - 3
scene/register_scene_types.cpp

@@ -1051,8 +1051,9 @@ void register_scene_types() {
 }
 
 void initialize_theme() {
-	bool default_theme_hidpi = GLOBAL_DEF("gui/theme/use_hidpi", false);
-	ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/use_hidpi", PropertyInfo(Variant::BOOL, "gui/theme/use_hidpi", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
+	// Allow creating the default theme at a different scale to suit higher/lower base resolutions.
+	float default_theme_scale = GLOBAL_DEF("gui/theme/default_theme_scale", 1.0);
+	ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/default_theme_scale", PropertyInfo(Variant::FLOAT, "gui/theme/default_theme_scale", PROPERTY_HINT_RANGE, "0.5,8,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
 	String theme_path = GLOBAL_DEF_RST("gui/theme/custom", "");
 	ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom", PropertyInfo(Variant::STRING, "gui/theme/custom", PROPERTY_HINT_FILE, "*.tres,*.res,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
 	String font_path = GLOBAL_DEF_RST("gui/theme/custom_font", "");
@@ -1068,7 +1069,7 @@ void initialize_theme() {
 
 	// Always make the default theme to avoid invalid default font/icon/style in the given theme.
 	if (RenderingServer::get_singleton()) {
-		make_default_theme(default_theme_hidpi, font);
+		make_default_theme(default_theme_scale, font);
 	}
 
 	if (!theme_path.is_empty()) {

+ 17 - 0
scene/resources/default_theme/SCsub

@@ -4,6 +4,7 @@ Import("env")
 
 from platform_methods import run_in_subprocess
 import default_theme_builders
+import default_theme_icons_builders
 
 env.add_source_files(env.scene_sources, "*.cpp")
 
@@ -13,3 +14,19 @@ env.CommandNoCache(
     "#thirdparty/fonts/OpenSans_SemiBold.ttf",
     run_in_subprocess(default_theme_builders.make_fonts_header),
 )
+
+env["BUILDERS"]["MakeDefaultThemeIconsBuilder"] = Builder(
+    action=env.Run(
+        default_theme_icons_builders.make_default_theme_icons_action, "Generating default project theme icons header."
+    ),
+    suffix=".h",
+    src_suffix=".svg",
+)
+
+# Default theme icons
+icon_sources = Glob("*.svg")
+
+env.Alias(
+    "default_theme_icons",
+    [env.MakeDefaultThemeIconsBuilder("#scene/resources/default_theme/default_theme_icons.gen.h", icon_sources)],
+)

+ 1 - 0
scene/resources/default_theme/add.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v6h-6v2h6v6h2v-6h6v-2h-6v-6z" fill="#b2b2b2" fill-rule="nonzero"/></svg>

BIN
scene/resources/default_theme/arrow_down.png


+ 1 - 0
scene/resources/default_theme/arrow_down.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m5 7 3 3 3-3" fill="none" stroke="#b2b2b2" stroke-opacity=".45" stroke-width="2"/></svg>

BIN
scene/resources/default_theme/arrow_left.png


+ 1 - 0
scene/resources/default_theme/arrow_left.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m9 11-3-3 3-3" fill="none" stroke="#b2b2b2" stroke-opacity=".45" stroke-width="2"/></svg>

BIN
scene/resources/default_theme/arrow_right.png


+ 1 - 0
scene/resources/default_theme/arrow_right.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m6 11 3-3-3-3" fill="none" stroke="#b2b2b2" stroke-opacity=".45" stroke-width="2"/></svg>

BIN
scene/resources/default_theme/bar_arrow.png


BIN
scene/resources/default_theme/bookmark.png


+ 1 - 0
scene/resources/default_theme/bookmark.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#fefffe" fill-opacity=".85"><path d="m14.505 1.476h-12.995v13.049l6.491-5.185 6.504 5.185z"/><path d="m15.018 1.476c0-.25-.23-.452-.514-.452h-12.994c-.284 0-.513.202-.513.452v13.049c0 .178.119.34.306.413.185.071.402.041.552-.079l6.146-4.909 6.158 4.909c.151.12.367.15.553.079.187-.073.306-.235.306-.413zm-.514 0h-12.994v13.049l6.491-5.185 6.503 5.185z"/></g></svg>

+ 1 - 0
scene/resources/default_theme/breakpoint.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8c0 3.84-3.16 7-7 7s-7-3.16-7-7 3.16-7 7-7 7 3.16 7 7" fill="#ff5d5d" fill-opacity=".5" fill-rule="nonzero"/></svg>

BIN
scene/resources/default_theme/button_disabled.png


BIN
scene/resources/default_theme/button_focus.png


BIN
scene/resources/default_theme/button_hover.png


BIN
scene/resources/default_theme/button_normal.png


BIN
scene/resources/default_theme/button_pressed.png


BIN
scene/resources/default_theme/checked.png


+ 1 - 0
scene/resources/default_theme/checked.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.3333333 1c-1.2887 0-2.3333333 1.0446683-2.3333333 2.3333333v9.3333337c0 1.2887 1.0446683 2.333333 2.3333333 2.333333h9.3333337c1.2887 0 2.333333-1.044668 2.333333-2.333333v-9.3333337c0-1.2887-1.044668-2.3333333-2.333333-2.3333333z" fill="#fff" fill-opacity=".75" stroke-width="1.16667"/><path d="m11.500773 3.7343508-5.6117507 5.6117502-1.7045017-1.6814543-1.4992276 1.4992276 3.2037293 3.1806817 7.1109777-7.1109775z" fill="#1a1a1a" stroke-width="1.06023"/></svg>

BIN
scene/resources/default_theme/checked_disabled.png


+ 1 - 0
scene/resources/default_theme/checked_disabled.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.3333333 1c-1.2887 0-2.3333333 1.0446683-2.3333333 2.3333333v9.3333337c0 1.2887 1.0446683 2.333333 2.3333333 2.333333h9.3333337c1.2887 0 2.333333-1.044668 2.333333-2.333333v-9.3333337c0-1.2887-1.044668-2.3333333-2.333333-2.3333333z" fill="#fff" fill-opacity=".37" stroke-width="1.16667"/><path d="m11.500773 3.7343508-5.6117507 5.6117502-1.7045017-1.6814543-1.4992276 1.4992276 3.2037293 3.1806817 7.1109777-7.1109775z" fill="#1a1a1a" fill-opacity=".5" stroke-width="1.06023"/></svg>

BIN
scene/resources/default_theme/checker_bg.png


BIN
scene/resources/default_theme/close.png


+ 1 - 0
scene/resources/default_theme/close.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3 2-2 5 5 5-5 2 2-5 5 5 5-2 2-5.3020979-5-4.6979021 5-2-2 5-5z" fill="#fff" fill-opacity=".75"/></svg>

BIN
scene/resources/default_theme/close_hl.png


+ 1 - 0
scene/resources/default_theme/close_hl.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 15.999999" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 3 2-2 5 5 5-5 2 2-5 5 5 5-2 2-5.3020979-5-4.6979021 5-2-2 5-5z" fill="#fff"/></svg>

+ 1 - 0
scene/resources/default_theme/color_picker_bar_arrow.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 20" xmlns="http://www.w3.org/2000/svg"><path d="m3.564 15.218h8.872l-4.436-4.436z" fill="#b2b2b2" fill-rule="nonzero" stroke="#b2b2b2"/></svg>

+ 1 - 0
scene/resources/default_theme/color_picker_cursor.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0 -6-6zm0 1a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 5-5z" fill="#fff"/><path d="m8 3a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5-5 5 5 0 0 0 -5-5zm-.0605469 1a4 4 0 0 1 .0605469 0 4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 3.9394531-4z"/></svg>

BIN
scene/resources/default_theme/color_picker_hue.png


+ 1 - 0
scene/resources/default_theme/color_picker_hue.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 1 256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(0 256 -256 0 0 0)" gradientUnits="userSpaceOnUse" x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-color="#f00"/><stop offset=".04" stop-color="#ff4000"/><stop offset=".08" stop-color="#ff8000"/><stop offset=".17" stop-color="#ff0"/><stop offset=".25" stop-color="#80ff00"/><stop offset=".33" stop-color="#0f0"/><stop offset=".42" stop-color="#00ff80"/><stop offset=".5" stop-color="#0ff"/><stop offset=".58" stop-color="#0080ff"/><stop offset=".63" stop-color="#0040ff"/><stop offset=".67" stop-color="#00f"/><stop offset=".75" stop-color="#8000ff"/><stop offset=".83" stop-color="#f0f"/><stop offset=".92" stop-color="#ff0080"/><stop offset="1" stop-color="#f00"/></linearGradient><path d="m0 0h1v256h-1z" fill="url(#a)"/></svg>

+ 1 - 0
scene/resources/default_theme/color_picker_overbright.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m.5.5v10l10-10z" fill="#fff" stroke="#000"/><path d="m0 12 12-12h-1.714286l-10.285714 10.285714z" fill="#000003" stroke-width="2"/></svg>

+ 1 - 0
scene/resources/default_theme/color_picker_pipette.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-1.108 0-2 .892-2 2v2h-1v2h1v5c.001.712.383 1.372 1 1.729v1.271h2v-1.27c.618-.356.999-1.017 1-1.73v-5h1v-2h-1v-2c0-1.108-.892-2-2-2zm-1 6h2v5c0 .549-.451 1-1 1s-1-.451-1-1z" fill="#b2b2b2" fill-rule="nonzero"/></svg>

BIN
scene/resources/default_theme/color_picker_sample.png


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
scene/resources/default_theme/color_picker_sample.svg


Файловите разлики са ограничени, защото са твърде много
+ 354 - 354
scene/resources/default_theme/default_theme.cpp


+ 2 - 2
scene/resources/default_theme/default_theme.h

@@ -35,8 +35,8 @@
 
 const int default_font_size = 16;
 
-void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const Ref<Font> &large_font, Ref<Texture2D> &default_icon, Ref<StyleBox> &default_style, float p_scale);
-void make_default_theme(bool p_hidpi, Ref<Font> p_font);
+void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, Ref<Texture2D> &default_icon, Ref<StyleBox> &default_style, float p_scale);
+void make_default_theme(float p_scale, Ref<Font> p_font);
 void clear_default_theme();
 
 #endif

+ 78 - 0
scene/resources/default_theme/default_theme_icons_builders.py

@@ -0,0 +1,78 @@
+"""Functions used to generate source files during build time
+
+All such functions are invoked in a subprocess on Windows to prevent build flakiness.
+
+"""
+
+import os
+from io import StringIO
+from platform_methods import subprocess_main
+
+
+# See also `editor/icons/editor_icons_builders.py`.
+def make_default_theme_icons_action(target, source, env):
+
+    dst = target[0]
+    svg_icons = source
+
+    icons_string = StringIO()
+
+    for f in svg_icons:
+
+        fname = str(f)
+
+        icons_string.write('\t"')
+
+        with open(fname, "rb") as svgf:
+            b = svgf.read(1)
+            while len(b) == 1:
+                icons_string.write("\\" + str(hex(ord(b)))[1:])
+                b = svgf.read(1)
+
+        icons_string.write('"')
+        if fname != svg_icons[-1]:
+            icons_string.write(",")
+        icons_string.write("\n")
+
+    s = StringIO()
+    s.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n\n")
+    s.write('#include "modules/modules_enabled.gen.h"\n\n')
+    s.write("#ifndef _DEFAULT_THEME_ICONS_H\n")
+    s.write("#define _DEFAULT_THEME_ICONS_H\n")
+    s.write("static const int default_theme_icons_count = {};\n\n".format(len(svg_icons)))
+    s.write("#ifdef MODULE_SVG_ENABLED\n")
+    s.write("static const char *default_theme_icons_sources[] = {\n")
+    s.write(icons_string.getvalue())
+    s.write("};\n")
+    s.write("#endif // MODULE_SVG_ENABLED\n\n")
+    s.write("static const char *default_theme_icons_names[] = {\n")
+
+    index = 0
+    for f in svg_icons:
+
+        fname = str(f)
+
+        # Trim the `.svg` extension from the string.
+        icon_name = os.path.basename(fname)[:-4]
+
+        s.write('\t"{0}"'.format(icon_name))
+
+        if fname != svg_icons[-1]:
+            s.write(",")
+        s.write("\n")
+
+        index += 1
+
+    s.write("};\n")
+
+    s.write("#endif\n")
+
+    with open(dst, "w") as f:
+        f.write(s.getvalue())
+
+    s.close()
+    icons_string.close()
+
+
+if __name__ == "__main__":
+    subprocess_main(globals())

BIN
scene/resources/default_theme/dialog_bg.png


BIN
scene/resources/default_theme/dropdown.png


BIN
scene/resources/default_theme/ellipsis.png


BIN
scene/resources/default_theme/error_icon.png


+ 1 - 0
scene/resources/default_theme/error_icon.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1v8.5859l1.293-1.293a1.0001 1.0001 0 0 1 .69141-.29102 1.0001 1.0001 0 0 1 .72266.29102l2.293 2.293 2.293-2.293a1.0001 1.0001 0 0 1 1.4141 0l2.293 2.293 1-1v-3.5859h-5v-5h-7zm8 0v4h4zm-6 9.4141-2 2v2.5859h12v-2.5859l-.29297.29297a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293-2.293 2.293a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293z" fill="#ff5d5d" transform="translate(0 -.000017)"/></svg>

+ 0 - 38
scene/resources/default_theme/error_icon.xpm

@@ -1,38 +0,0 @@
-/* XPM */
-static const char * error_icon_xpm[] = {
-"32 32 3 1",
-" 	c None",
-".	c #FF00FF",
-"+	c #000000",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"....++++.+++..+++...++..+++.....",
-"....+....+..+.+..+.+..+.+..+....",
-"....+....+..+.+..+.+..+.+..+....",
-"....+++..+++..+++..+..+.+++.....",
-"....+....+..+.+..+.+..+.+..+....",
-"....+....+..+.+..+.+..+.+..+....",
-"....++++.+..+.+..+..++..+..+....",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................"};

+ 1 - 0
scene/resources/default_theme/file.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1v14h12v-9h-5v-5zm8 0v4h4z" fill="#b2b2b2" fill-rule="nonzero"/></svg>

BIN
scene/resources/default_theme/focus.png


+ 1 - 0
scene/resources/default_theme/folder.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m2 2c-.549 0-1 .451-1 1v10c0 .549.451 1 1 1h12c.549 0 1-.451 1-1v-7c0-.549-.451-1-1-1h-4c-.549 0-1-.451-1-1v-1c0-.549-.451-1-1-1z" fill="#b2b2b2" fill-rule="nonzero"/></svg>

+ 1 - 0
scene/resources/default_theme/folder_up.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m3 8c.003.26.107.509.291.693.388.388 1.026.388 1.414 0l2.293-2.293v4.586c0 .553.448 1 1 1s1-.447 1-1v-4.586l2.293 2.293c.388.388 1.026.388 1.414 0 .388-.387.388-1.026 0-1.414l-4-4c-.388-.387-1.026-.387-1.414 0l-4 4c-.19.191-.295.451-.291.721z" fill="#b2b2b2" fill-rule="nonzero"/></svg>

BIN
scene/resources/default_theme/graph_node.png


BIN
scene/resources/default_theme/graph_node_breakpoint.png


BIN
scene/resources/default_theme/graph_node_close.png


BIN
scene/resources/default_theme/graph_node_comment.png


BIN
scene/resources/default_theme/graph_node_comment_focus.png


BIN
scene/resources/default_theme/graph_node_default.png


BIN
scene/resources/default_theme/graph_node_default_focus.png


BIN
scene/resources/default_theme/graph_node_position.png


BIN
scene/resources/default_theme/graph_node_selected.png


BIN
scene/resources/default_theme/graph_port.png


+ 1 - 0
scene/resources/default_theme/graph_port.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m10 5c0 2.743-2.257 5-5 5s-5-2.257-5-5 2.257-5 5-5 5 2.257 5 5" fill="#fff"/><path d="m8.667 5c0 2.011-1.656 3.667-3.667 3.667s-3.667-1.656-3.667-3.667 1.656-3.667 3.667-3.667 3.667 1.656 3.667 3.667" fill="#b2b2b2" fill-opacity=".65"/></g></svg>

+ 1 - 0
scene/resources/default_theme/grid_layout.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke-width="1.3"><g stroke="#fefffe"><path d="m1.87 6.541h2.917v2.917h-2.917z"/><path d="m6.536 6.541h2.917v2.917h-2.917z"/><path d="m11.202 6.541h2.917v2.917h-2.917z"/></g><g stroke="#e0e0e0" stroke-opacity=".65"><path d="m5.432 1.112-1.95 1.95 1.95 1.95" stroke-linejoin="miter" stroke-miterlimit="10"/><path d="m3.482 3.062h9.386"/><path d="m10.731 11.112 1.95 1.95-1.95 1.95" stroke-linejoin="miter" stroke-miterlimit="10"/><path d="m3.294 13.062h9.387"/></g></g></svg>

+ 1 - 0
scene/resources/default_theme/grid_minimap.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m14 2.199v2.615l-2.625 1.313v-2.615zm-12 4.065 2.625 1.312v2.551l-2.625-1.313zm12 0v2.55l-2.625 1.313v-2.551zm-8 1.455h4v2.64h-4zm-4 2.56 2.625 1.313v2.521l-2.625-1.312zm12 0v2.522l-2.625 1.312v-2.521zm-8 1.455h4v2.641h-4zm1.701-8.109h2.299v2.734h-4.156s-.749.647-.875.641c-.131-.007-1.51-1.456-1.51-1.456l-1.459-.73v-2.615l.068.034s.027-.457.063-.676c.034-.212.197-.592.197-.592l-1.049-.524c-.079-.04-.167-.062-.256-.066-.354-.013-.648.27-.648.625v12c0 .237.134.453.346.559l4 2c.086.043.182.066.279.066h6c.097 0 .193-.023.279-.066l4-2c.212-.106.346-.322.346-.559v-12c0-.464-.489-.766-.904-.559l-3.869 1.934h-2.971s.033.417.016.625c-.03.346-.196.625-.196.625z" fill="#b2b2b2" fill-opacity=".65"/><path d="m5 6s-2.219-2.162-2.219-3.243c0-1.08 0-2.607 2.219-2.607s2.219 1.527 2.219 2.607c0 1.081-2.219 3.243-2.219 3.243z" fill="#fefffe"/></g></svg>

+ 1 - 0
scene/resources/default_theme/grid_snap.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m3 0v3h-3v2h3v4h-3v2h3v3h2v-9h9v-2h-3v-3h-2v3h-4v-3zm4 13v2h2v-2zm6 0v2h2v-2z" fill="#b2b2b2" fill-opacity=".65"/><path d="m11 7c-2.194 0-4 1.806-4 4v2h2v-2c0-1.097.903-2 2-2s2 .903 2 2v2h2v-2c0-2.194-1.806-4-4-4z" fill="#fefffe"/></g></svg>

BIN
scene/resources/default_theme/hseparator.png


BIN
scene/resources/default_theme/hslider_bg.png


BIN
scene/resources/default_theme/hslider_grabber.png


BIN
scene/resources/default_theme/hslider_grabber_disabled.png


BIN
scene/resources/default_theme/hslider_grabber_hl.png


BIN
scene/resources/default_theme/hslider_tick.png


+ 1 - 0
scene/resources/default_theme/hslider_tick.svg

@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 4 15.999999" width="4" xmlns="http://www.w3.org/2000/svg"><path d="m1 0h2v16h-2z" fill="#fff" fill-opacity=".25" stroke-width=".285079"/></svg>

BIN
scene/resources/default_theme/hsplit_bg.png


BIN
scene/resources/default_theme/hsplitter.png


+ 1 - 0
scene/resources/default_theme/hsplitter.svg

@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" viewBox="0 0 8 48" xmlns="http://www.w3.org/2000/svg"><path d="m4 4.012v39.976" fill="none" stroke="#808080" stroke-opacity=".65" stroke-width="1.7"/></svg>

BIN
scene/resources/default_theme/icon_add.png


BIN
scene/resources/default_theme/icon_close.png


BIN
scene/resources/default_theme/icon_color_pick.png


BIN
scene/resources/default_theme/icon_file.png


Някои файлове не бяха показани, защото твърде много файлове са промени