Added theme for button
This commit is contained in:
parent
08b318b93b
commit
0e121e718d
@ -1,22 +1,16 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://d0x0yv7nevod7"]
|
[gd_scene load_steps=3 format=3 uid="uid://d0x0yv7nevod7"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scenes/BtnIcon.cs" id="1_b787p"]
|
[ext_resource type="Script" path="res://scenes/BtnIcon.cs" id="1_b787p"]
|
||||||
|
[ext_resource type="Theme" uid="uid://uqhultm05f5a" path="res://theme/ui_theme.tres" id="2_8n123"]
|
||||||
|
|
||||||
[node name="btn_icon" type="Control"]
|
[node name="btn_icon" type="MarginContainer"]
|
||||||
layout_mode = 3
|
theme_override_constants/margin_left = 6
|
||||||
anchors_preset = 15
|
theme_override_constants/margin_top = 6
|
||||||
anchor_right = 1.0
|
theme_override_constants/margin_right = 6
|
||||||
anchor_bottom = 1.0
|
theme_override_constants/margin_bottom = 6
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
script = ExtResource("1_b787p")
|
script = ExtResource("1_b787p")
|
||||||
|
|
||||||
[node name="margin" type="MarginContainer" parent="."]
|
[node name="btn" type="Button" parent="."]
|
||||||
layout_mode = 0
|
|
||||||
offset_right = 40.0
|
|
||||||
offset_bottom = 40.0
|
|
||||||
|
|
||||||
[node name="btn" type="Button" parent="margin"]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_constants/h_separation = 6
|
theme = ExtResource("2_8n123")
|
||||||
|
21
I18N Commander/App/theme/ui_style_box_flat_focus.tres
Normal file
21
I18N Commander/App/theme/ui_style_box_flat_focus.tres
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://chaurklijlgu7"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
content_margin_left = 16.0
|
||||||
|
content_margin_top = 16.0
|
||||||
|
content_margin_right = 16.0
|
||||||
|
content_margin_bottom = 16.0
|
||||||
|
bg_color = Color(0.309804, 0.309804, 0.309804, 1)
|
||||||
|
skew = Vector2(2.08165e-12, 2.08165e-12)
|
||||||
|
border_width_left = 4
|
||||||
|
border_width_top = 4
|
||||||
|
border_width_right = 4
|
||||||
|
border_width_bottom = 4
|
||||||
|
border_color = Color(0.0509804, 0.0509804, 0.0509804, 1)
|
||||||
|
border_blend = true
|
||||||
|
corner_radius_top_left = 6
|
||||||
|
corner_radius_top_right = 6
|
||||||
|
corner_radius_bottom_right = 6
|
||||||
|
corner_radius_bottom_left = 6
|
||||||
|
shadow_size = 2
|
||||||
|
shadow_offset = Vector2(1, 1)
|
21
I18N Commander/App/theme/ui_style_box_flat_hover.tres
Normal file
21
I18N Commander/App/theme/ui_style_box_flat_hover.tres
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://l1tjpnljc6c1"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
content_margin_left = 16.0
|
||||||
|
content_margin_top = 16.0
|
||||||
|
content_margin_right = 16.0
|
||||||
|
content_margin_bottom = 16.0
|
||||||
|
bg_color = Color(0.309804, 0.309804, 0.309804, 1)
|
||||||
|
skew = Vector2(2.08165e-12, 2.08165e-12)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
border_color = Color(0.0509804, 0.0509804, 0.0509804, 1)
|
||||||
|
border_blend = true
|
||||||
|
corner_radius_top_left = 6
|
||||||
|
corner_radius_top_right = 6
|
||||||
|
corner_radius_bottom_right = 6
|
||||||
|
corner_radius_bottom_left = 6
|
||||||
|
shadow_size = 2
|
||||||
|
shadow_offset = Vector2(1, 1)
|
19
I18N Commander/App/theme/ui_style_box_flat_norm.tres
Normal file
19
I18N Commander/App/theme/ui_style_box_flat_norm.tres
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://tj810ebe65el"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
content_margin_left = 16.0
|
||||||
|
content_margin_top = 16.0
|
||||||
|
content_margin_right = 16.0
|
||||||
|
content_margin_bottom = 16.0
|
||||||
|
bg_color = Color(0.239216, 0.239216, 0.239216, 1)
|
||||||
|
skew = Vector2(2.08165e-12, 2.08165e-12)
|
||||||
|
border_width_left = 2
|
||||||
|
border_width_top = 2
|
||||||
|
border_width_right = 2
|
||||||
|
border_width_bottom = 2
|
||||||
|
border_color = Color(0, 0, 0, 1)
|
||||||
|
border_blend = true
|
||||||
|
corner_radius_top_left = 6
|
||||||
|
corner_radius_top_right = 6
|
||||||
|
corner_radius_bottom_right = 6
|
||||||
|
corner_radius_bottom_left = 6
|
21
I18N Commander/App/theme/ui_style_box_flat_press.tres
Normal file
21
I18N Commander/App/theme/ui_style_box_flat_press.tres
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[gd_resource type="StyleBoxFlat" format=3 uid="uid://he0mxms4j1q7"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
content_margin_left = 16.0
|
||||||
|
content_margin_top = 16.0
|
||||||
|
content_margin_right = 16.0
|
||||||
|
content_margin_bottom = 16.0
|
||||||
|
bg_color = Color(0.4, 0.4, 0.4, 1)
|
||||||
|
skew = Vector2(2.08165e-12, 2.08165e-12)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
border_color = Color(0.380392, 0.380392, 0.380392, 1)
|
||||||
|
border_blend = true
|
||||||
|
corner_radius_top_left = 6
|
||||||
|
corner_radius_top_right = 6
|
||||||
|
corner_radius_bottom_right = 6
|
||||||
|
corner_radius_bottom_left = 6
|
||||||
|
shadow_size = 2
|
||||||
|
shadow_offset = Vector2(1, 1)
|
13
I18N Commander/App/theme/ui_theme.tres
Normal file
13
I18N Commander/App/theme/ui_theme.tres
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://uqhultm05f5a"]
|
||||||
|
|
||||||
|
[ext_resource type="StyleBox" uid="uid://chaurklijlgu7" path="res://theme/ui_style_box_flat_focus.tres" id="1_6cjme"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://l1tjpnljc6c1" path="res://theme/ui_style_box_flat_hover.tres" id="2_p66gj"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://tj810ebe65el" path="res://theme/ui_style_box_flat_norm.tres" id="3_fp785"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://he0mxms4j1q7" path="res://theme/ui_style_box_flat_press.tres" id="4_o3616"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
Button/constants/h_separation = 6
|
||||||
|
Button/styles/focus = ExtResource("1_6cjme")
|
||||||
|
Button/styles/hover = ExtResource("2_p66gj")
|
||||||
|
Button/styles/normal = ExtResource("3_fp785")
|
||||||
|
Button/styles/pressed = ExtResource("4_o3616")
|
Loading…
Reference in New Issue
Block a user