Generate theme buttons via code

Instead of having hardcoded nodes. This makes implementing new themes a bit easier.
This commit is contained in:
OverloadedOrama 2020-08-15 00:10:34 +03:00
parent 79bd015c19
commit 0fbc2987ca
7 changed files with 3504 additions and 3539 deletions

View file

@ -7,28 +7,15 @@
[ext_resource path="res://assets/themes/light/icons/vsplit.png" type="Texture" id=5]
[ext_resource path="res://assets/themes/light/icons/spinbox.png" type="Texture" id=6]
[sub_resource type="StyleBoxFlat" id=33]
bg_color = Color( 0.419608, 0.403922, 0.337255, 1 )
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 5.0
content_margin_right = 5.0
content_margin_top = 3.0
content_margin_bottom = 3.0
bg_color = Color( 0.392157, 0.329412, 0.207843, 1 )
border_color = Color( 0.588235, 0.568627, 0.470588, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
bg_color = Color( 0.419608, 0.403922, 0.337255, 1 )
[sub_resource type="StyleBoxFlat" id=2]
content_margin_left = 5.0
content_margin_right = 5.0
content_margin_top = 3.0
content_margin_bottom = 3.0
bg_color = Color( 0.656738, 0.525779, 0.243711, 1 )
bg_color = Color( 0.392157, 0.329412, 0.207843, 1 )
border_color = Color( 0.588235, 0.568627, 0.470588, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
@ -41,7 +28,7 @@ content_margin_left = 5.0
content_margin_right = 5.0
content_margin_top = 3.0
content_margin_bottom = 3.0
bg_color = Color( 0.501961, 0.4, 0.180392, 1 )
bg_color = Color( 0.656738, 0.525779, 0.243711, 1 )
border_color = Color( 0.588235, 0.568627, 0.470588, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
@ -54,7 +41,7 @@ content_margin_left = 5.0
content_margin_right = 5.0
content_margin_top = 3.0
content_margin_bottom = 3.0
bg_color = Color( 0.576471, 0.478431, 0.27451, 1 )
bg_color = Color( 0.501961, 0.4, 0.180392, 1 )
border_color = Color( 0.588235, 0.568627, 0.470588, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
@ -63,7 +50,17 @@ corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=5]
bg_color = Color( 0.6, 0.6, 0.6, 0 )
content_margin_left = 5.0
content_margin_right = 5.0
content_margin_top = 3.0
content_margin_bottom = 3.0
bg_color = Color( 0.576471, 0.478431, 0.27451, 1 )
border_color = Color( 0.588235, 0.568627, 0.470588, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=6]
bg_color = Color( 0.6, 0.6, 0.6, 0 )
@ -75,6 +72,9 @@ bg_color = Color( 0.6, 0.6, 0.6, 0 )
bg_color = Color( 0.6, 0.6, 0.6, 0 )
[sub_resource type="StyleBoxFlat" id=9]
bg_color = Color( 0.6, 0.6, 0.6, 0 )
[sub_resource type="StyleBoxFlat" id=10]
border_width_left = 2
border_width_top = 2
border_width_right = 2
@ -85,21 +85,8 @@ corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[sub_resource type="StyleBoxFlat" id=10]
bg_color = Color( 0.588235, 0.568627, 0.470588, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color( 0.219608, 0.211765, 0.184314, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=11]
bg_color = Color( 0.745098, 0.721569, 0.607843, 1 )
bg_color = Color( 0.588235, 0.568627, 0.470588, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
@ -112,7 +99,7 @@ corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=12]
bg_color = Color( 0.372549, 0.360784, 0.301961, 1 )
bg_color = Color( 0.745098, 0.721569, 0.607843, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
@ -125,6 +112,19 @@ corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=13]
bg_color = Color( 0.372549, 0.360784, 0.301961, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color( 0.219608, 0.211765, 0.184314, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=14]
bg_color = Color( 0.445313, 0.432846, 0.370514, 1 )
border_width_top = 5
border_width_bottom = 5
@ -134,13 +134,13 @@ corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[sub_resource type="StyleBoxFlat" id=14]
[sub_resource type="StyleBoxFlat" id=15]
bg_color = Color( 0.552941, 0.376471, 0, 1 )
border_width_top = 2
border_width_bottom = 2
border_color = Color( 0.552941, 0.376471, 0, 1 )
[sub_resource type="StyleBoxFlat" id=15]
[sub_resource type="StyleBoxFlat" id=16]
bg_color = Color( 0.72549, 0.478431, 0, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
@ -149,13 +149,13 @@ corner_radius_bottom_left = 4
expand_margin_top = 2.0
expand_margin_bottom = 2.0
[sub_resource type="StyleBoxFlat" id=16]
[sub_resource type="StyleBoxFlat" id=17]
bg_color = Color( 0.866667, 0.827451, 0.615686, 1 )
border_color = Color( 0.321569, 0.321569, 0.321569, 1 )
expand_margin_top = 2.0
expand_margin_bottom = 2.0
[sub_resource type="StyleBoxFlat" id=17]
[sub_resource type="StyleBoxFlat" id=18]
bg_color = Color( 0.588235, 0.568627, 0.470588, 1 )
border_width_left = 4
border_width_top = 4
@ -167,7 +167,7 @@ corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[sub_resource type="StyleBoxFlat" id=18]
[sub_resource type="StyleBoxFlat" id=19]
bg_color = Color( 0.109804, 0.0862745, 0.0862745, 0 )
border_width_left = 1
border_width_top = 1
@ -180,7 +180,7 @@ corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=19]
[sub_resource type="StyleBoxFlat" id=20]
bg_color = Color( 0.392157, 0.329412, 0.207843, 1 )
border_width_left = 1
border_width_top = 1
@ -192,13 +192,13 @@ corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[sub_resource type="StyleBoxFlat" id=32]
[sub_resource type="StyleBoxFlat" id=21]
bg_color = Color( 0.709804, 0.517647, 0.188235, 1 )
[sub_resource type="StyleBoxFlat" id=20]
[sub_resource type="StyleBoxFlat" id=22]
bg_color = Color( 0.854902, 0.74902, 0.494118, 1 )
[sub_resource type="StyleBoxFlat" id=21]
[sub_resource type="StyleBoxFlat" id=23]
content_margin_left = 4.5
content_margin_right = 4.5
content_margin_top = 3.0
@ -209,7 +209,7 @@ corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxFlat" id=22]
[sub_resource type="StyleBoxFlat" id=24]
bg_color = Color( 0.588235, 0.568627, 0.470588, 1 )
border_width_left = 6
border_width_top = 10
@ -222,10 +222,10 @@ corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=23]
[sub_resource type="StyleBoxFlat" id=25]
bg_color = Color( 0.219608, 0.211765, 0.168627, 1 )
[sub_resource type="StyleBoxFlat" id=24]
[sub_resource type="StyleBoxFlat" id=26]
bg_color = Color( 1, 0.898039, 0.501961, 1 )
border_width_left = 5
border_width_top = 10
@ -238,7 +238,7 @@ corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=25]
[sub_resource type="StyleBoxFlat" id=27]
bg_color = Color( 0.545098, 0.384314, 0, 1 )
border_width_left = 10
border_width_top = 6
@ -246,7 +246,7 @@ border_width_right = 10
border_width_bottom = 8
border_color = Color( 0.545098, 0.384314, 0, 1 )
[sub_resource type="StyleBoxFlat" id=26]
[sub_resource type="StyleBoxFlat" id=28]
bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
border_width_left = 10
border_width_top = 6
@ -254,7 +254,7 @@ border_width_right = 10
border_width_bottom = 8
border_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[sub_resource type="StyleBoxFlat" id=27]
[sub_resource type="StyleBoxFlat" id=29]
bg_color = Color( 1, 0.898039, 0.501961, 1 )
border_width_left = 10
border_width_top = 6
@ -262,7 +262,7 @@ border_width_right = 10
border_width_bottom = 8
border_color = Color( 1, 0.898039, 0.501961, 1 )
[sub_resource type="StyleBoxFlat" id=28]
[sub_resource type="StyleBoxFlat" id=30]
bg_color = Color( 0.588235, 0.568627, 0.470588, 1 )
border_width_left = 4
border_width_top = 4
@ -275,7 +275,7 @@ corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id=29]
[sub_resource type="StyleBoxFlat" id=31]
bg_color = Color( 0.445313, 0.432846, 0.370514, 1 )
border_width_left = 5
border_width_right = 5
@ -285,13 +285,13 @@ corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[sub_resource type="StyleBoxFlat" id=30]
[sub_resource type="StyleBoxFlat" id=32]
bg_color = Color( 0.372549, 0.360784, 0.301961, 1 )
border_width_left = 2
border_width_right = 2
border_color = Color( 0.552941, 0.376471, 0, 1 )
[sub_resource type="StyleBoxFlat" id=31]
[sub_resource type="StyleBoxFlat" id=33]
bg_color = Color( 0.901961, 0.866667, 0.670588, 1 )
border_width_left = 2
border_width_top = 20
@ -308,12 +308,12 @@ Button/colors/font_color_hover = Color( 0, 0, 0, 1 )
Button/colors/font_color_pressed = Color( 0, 0, 0, 1 )
Button/constants/hseparation = 2
Button/fonts/font = null
Button/styles/Ruler = SubResource( 33 )
Button/styles/disabled = SubResource( 1 )
Button/styles/Ruler = SubResource( 1 )
Button/styles/disabled = SubResource( 2 )
Button/styles/focus = null
Button/styles/hover = SubResource( 2 )
Button/styles/normal = SubResource( 3 )
Button/styles/pressed = SubResource( 4 )
Button/styles/hover = SubResource( 3 )
Button/styles/normal = SubResource( 4 )
Button/styles/pressed = SubResource( 5 )
CheckBox/colors/font_color = Color( 0, 0, 0, 1 )
CheckBox/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
CheckBox/colors/font_color_hover = Color( 0, 0, 0, 1 )
@ -328,10 +328,10 @@ CheckBox/icons/radio_unchecked = null
CheckBox/icons/unchecked = null
CheckBox/styles/disabled = null
CheckBox/styles/focus = null
CheckBox/styles/hover = SubResource( 5 )
CheckBox/styles/hover_pressed = SubResource( 6 )
CheckBox/styles/normal = SubResource( 7 )
CheckBox/styles/pressed = SubResource( 8 )
CheckBox/styles/hover = SubResource( 6 )
CheckBox/styles/hover_pressed = SubResource( 7 )
CheckBox/styles/normal = SubResource( 8 )
CheckBox/styles/pressed = SubResource( 9 )
ColorPicker/constants/h_width = 30
ColorPicker/constants/label_width = 10
ColorPicker/constants/margin = 4
@ -352,7 +352,7 @@ ColorPickerButton/icons/bg = null
ColorPickerButton/styles/disabled = null
ColorPickerButton/styles/focus = null
ColorPickerButton/styles/hover = null
ColorPickerButton/styles/normal = SubResource( 9 )
ColorPickerButton/styles/normal = SubResource( 10 )
ColorPickerButton/styles/pressed = null
Dialogs/constants/button_margin = 32
Dialogs/constants/margin = 8
@ -366,22 +366,22 @@ HScrollBar/icons/decrement = null
HScrollBar/icons/decrement_highlight = null
HScrollBar/icons/increment = null
HScrollBar/icons/increment_highlight = null
HScrollBar/styles/grabber = SubResource( 10 )
HScrollBar/styles/grabber_highlight = SubResource( 11 )
HScrollBar/styles/grabber_pressed = SubResource( 12 )
HScrollBar/styles/scroll = SubResource( 13 )
HScrollBar/styles/grabber = SubResource( 11 )
HScrollBar/styles/grabber_highlight = SubResource( 12 )
HScrollBar/styles/grabber_pressed = SubResource( 13 )
HScrollBar/styles/scroll = SubResource( 14 )
HScrollBar/styles/scroll_focus = null
HSeparator/constants/separation = 4
HSeparator/styles/separator = SubResource( 14 )
HSeparator/styles/separator = SubResource( 15 )
HSlider/icons/grabber = ExtResource( 2 )
HSlider/icons/grabber_disabled = null
HSlider/icons/grabber_highlight = ExtResource( 3 )
HSlider/icons/tick = null
HSlider/styles/focus = null
HSlider/styles/grabber_area = SubResource( 15 )
HSlider/styles/grabber_area = SubResource( 16 )
HSlider/styles/grabber_disabled = null
HSlider/styles/grabber_highlight = null
HSlider/styles/slider = SubResource( 16 )
HSlider/styles/slider = SubResource( 17 )
HSplitContainer/constants/autohide = 1
HSplitContainer/constants/separation = 6
HSplitContainer/icons/grabber = ExtResource( 4 )
@ -394,7 +394,7 @@ ItemList/constants/icon_margin = 4
ItemList/constants/line_separation = 2
ItemList/constants/vseparation = 4
ItemList/fonts/font = null
ItemList/styles/bg = SubResource( 17 )
ItemList/styles/bg = SubResource( 18 )
ItemList/styles/bg_focus = null
ItemList/styles/cursor = null
ItemList/styles/cursor_unfocused = null
@ -420,8 +420,8 @@ LineEdit/constants/minimum_spaces = 12
LineEdit/fonts/font = null
LineEdit/icons/clear = null
LineEdit/styles/focus = null
LineEdit/styles/normal = SubResource( 18 )
LineEdit/styles/read_only = SubResource( 19 )
LineEdit/styles/normal = SubResource( 19 )
LineEdit/styles/read_only = SubResource( 20 )
MenuButton/colors/font_color = Color( 0.878431, 0.878431, 0.878431, 1 )
MenuButton/colors/font_color_disabled = Color( 1, 1, 1, 0.3 )
MenuButton/colors/font_color_hover = Color( 0.941176, 0.941176, 0.941176, 1 )
@ -446,11 +446,11 @@ OptionButton/styles/focus = null
OptionButton/styles/hover = null
OptionButton/styles/normal = null
OptionButton/styles/pressed = null
Panel/styles/TopMenu = SubResource( 32 )
Panel/styles/panel = SubResource( 20 )
Panel/styles/TopMenu = SubResource( 21 )
Panel/styles/panel = SubResource( 22 )
Panel/styles/panelf = null
Panel/styles/panelnc = null
PanelContainer/styles/panel = SubResource( 21 )
PanelContainer/styles/panel = SubResource( 23 )
PopupMenu/colors/font_color = Color( 0, 0, 0, 1 )
PopupMenu/colors/font_color_accel = Color( 0.270588, 0.270588, 0.270588, 0.8 )
PopupMenu/colors/font_color_disabled = Color( 0.4, 0.4, 0.4, 0.8 )
@ -466,10 +466,10 @@ PopupMenu/icons/unchecked = null
PopupMenu/styles/hover = null
PopupMenu/styles/labeled_separator_left = null
PopupMenu/styles/labeled_separator_right = null
PopupMenu/styles/panel = SubResource( 22 )
PopupMenu/styles/panel = SubResource( 24 )
PopupMenu/styles/panel_disabled = null
PopupMenu/styles/separator = null
PopupPanel/styles/panel = SubResource( 23 )
PopupPanel/styles/panel = SubResource( 25 )
SpinBox/icons/updown = ExtResource( 6 )
TabContainer/colors/font_color_bg = Color( 0, 0, 0, 1 )
TabContainer/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
@ -486,10 +486,10 @@ TabContainer/icons/increment = null
TabContainer/icons/increment_highlight = null
TabContainer/icons/menu = null
TabContainer/icons/menu_highlight = null
TabContainer/styles/panel = SubResource( 24 )
TabContainer/styles/tab_bg = SubResource( 25 )
TabContainer/styles/tab_disabled = SubResource( 26 )
TabContainer/styles/tab_fg = SubResource( 27 )
TabContainer/styles/panel = SubResource( 26 )
TabContainer/styles/tab_bg = SubResource( 27 )
TabContainer/styles/tab_disabled = SubResource( 28 )
TabContainer/styles/tab_fg = SubResource( 29 )
Tabs/colors/font_color_bg = Color( 0.69, 0.69, 0.69, 1 )
Tabs/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
Tabs/colors/font_color_fg = Color( 0.94, 0.94, 0.94, 1 )
@ -505,10 +505,10 @@ Tabs/icons/increment = null
Tabs/icons/increment_highlight = null
Tabs/styles/button = null
Tabs/styles/button_pressed = null
Tabs/styles/panel = SubResource( 24 )
Tabs/styles/tab_bg = SubResource( 25 )
Tabs/styles/tab_disabled = SubResource( 26 )
Tabs/styles/tab_fg = SubResource( 27 )
Tabs/styles/panel = SubResource( 26 )
Tabs/styles/tab_bg = SubResource( 27 )
Tabs/styles/tab_disabled = SubResource( 28 )
Tabs/styles/tab_fg = SubResource( 29 )
TextEdit/colors/background_color = Color( 0, 0, 0, 0 )
TextEdit/colors/brace_mismatch_color = Color( 1, 0.2, 0.2, 1 )
TextEdit/colors/breakpoint_color = Color( 0.8, 0.8, 0.4, 0.2 )
@ -540,7 +540,7 @@ TextEdit/fonts/font = null
TextEdit/icons/tab = null
TextEdit/styles/completion = null
TextEdit/styles/focus = null
TextEdit/styles/normal = SubResource( 28 )
TextEdit/styles/normal = SubResource( 30 )
TextEdit/styles/read_only = null
Tree/colors/cursor_color = Color( 0, 0, 0, 1 )
Tree/colors/custom_button_font_highlight = Color( 0.941176, 0.941176, 0.941176, 1 )
@ -568,7 +568,7 @@ Tree/icons/checked = null
Tree/icons/select_arrow = null
Tree/icons/unchecked = null
Tree/icons/updown = null
Tree/styles/bg = SubResource( 17 )
Tree/styles/bg = SubResource( 18 )
Tree/styles/bg_focus = null
Tree/styles/button_pressed = null
Tree/styles/cursor = null
@ -586,13 +586,13 @@ VScrollBar/icons/decrement = null
VScrollBar/icons/decrement_highlight = null
VScrollBar/icons/increment = null
VScrollBar/icons/increment_highlight = null
VScrollBar/styles/grabber = SubResource( 10 )
VScrollBar/styles/grabber_highlight = SubResource( 11 )
VScrollBar/styles/grabber_pressed = SubResource( 12 )
VScrollBar/styles/scroll = SubResource( 29 )
VScrollBar/styles/grabber = SubResource( 11 )
VScrollBar/styles/grabber_highlight = SubResource( 12 )
VScrollBar/styles/grabber_pressed = SubResource( 13 )
VScrollBar/styles/scroll = SubResource( 31 )
VScrollBar/styles/scroll_focus = null
VSeparator/constants/separation = 4
VSeparator/styles/separator = SubResource( 30 )
VSeparator/styles/separator = SubResource( 32 )
VSplitContainer/constants/autohide = 1
VSplitContainer/constants/separation = 6
VSplitContainer/icons/grabber = ExtResource( 5 )
@ -605,4 +605,4 @@ WindowDialog/constants/title_height = 20
WindowDialog/fonts/title_font = null
WindowDialog/icons/close = null
WindowDialog/icons/close_highlight = null
WindowDialog/styles/panel = SubResource( 31 )
WindowDialog/styles/panel = SubResource( 33 )