From c23eb487fe983c93ab9ccccccf4f3d7501a19751 Mon Sep 17 00:00:00 2001 From: Variable Date: Wed, 11 Sep 2024 18:02:42 +0500 Subject: [PATCH] fixed aspects of brush buttons --- src/UI/Buttons/BrushButton.tscn | 2 +- src/UI/Buttons/PatternButton.tscn | 40 +++++++++++++++---------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/UI/Buttons/BrushButton.tscn b/src/UI/Buttons/BrushButton.tscn index 0b278e1be..5e9ea796a 100644 --- a/src/UI/Buttons/BrushButton.tscn +++ b/src/UI/Buttons/BrushButton.tscn @@ -21,7 +21,7 @@ offset_right = -2.0 offset_bottom = -2.0 pivot_offset = Vector2(16, 16) expand_mode = 1 -stretch_mode = 6 +stretch_mode = 5 [node name="TransparentChecker" parent="BrushTexture" instance=ExtResource("1")] show_behind_parent = true diff --git a/src/UI/Buttons/PatternButton.tscn b/src/UI/Buttons/PatternButton.tscn index 5b3550209..e63ca0cd8 100644 --- a/src/UI/Buttons/PatternButton.tscn +++ b/src/UI/Buttons/PatternButton.tscn @@ -1,19 +1,19 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=4 format=3 uid="uid://bx6xntkb2tstx"] -[ext_resource path="res://src/UI/Buttons/PatternButton.gd" type="Script" id=2] +[ext_resource type="Script" path="res://src/UI/Buttons/PatternButton.gd" id="2"] -[sub_resource type="StyleBoxFlat" id=2] -bg_color = Color( 1, 1, 1, 1 ) -border_color = Color( 1, 1, 1, 1 ) +[sub_resource type="StyleBoxFlat" id="1"] +bg_color = Color(1, 1, 1, 1) +border_color = Color(1, 1, 1, 1) corner_radius_top_left = 5 corner_radius_top_right = 5 corner_radius_bottom_right = 5 corner_radius_bottom_left = 5 anti_aliasing = false -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 1, 1, 1, 1 ) -border_color = Color( 1, 1, 1, 1 ) +[sub_resource type="StyleBoxFlat" id="2"] +bg_color = Color(1, 1, 1, 1) +border_color = Color(1, 1, 1, 1) corner_radius_top_left = 5 corner_radius_top_right = 5 corner_radius_bottom_right = 5 @@ -21,25 +21,23 @@ corner_radius_bottom_left = 5 anti_aliasing = false [node name="PatternButton" type="Button"] +custom_minimum_size = Vector2(32, 32) offset_right = 32.0 offset_bottom = 32.0 -custom_minimum_size = Vector2( 32, 32 ) -theme_override_styles/hover = SubResource( 2 ) -theme_override_styles/pressed = SubResource( 2 ) -theme_override_styles/focus = SubResource( 1 ) -theme_override_styles/disabled = SubResource( 1 ) -theme_override_styles/normal = SubResource( 2 ) +theme_override_styles/focus = SubResource("1") +theme_override_styles/disabled = SubResource("1") +theme_override_styles/hover = SubResource("2") +theme_override_styles/pressed = SubResource("2") +theme_override_styles/normal = SubResource("2") button_mask = 7 -script = ExtResource( 2 ) +script = ExtResource("2") [node name="PatternTexture" type="TextureRect" parent="."] +custom_minimum_size = Vector2(32, 32) +layout_mode = 0 offset_right = 32.0 offset_bottom = 32.0 -custom_minimum_size = Vector2( 32, 32 ) -expand = true -stretch_mode = 6 -__meta__ = { -"_edit_use_anchors_": false -} +expand_mode = 1 +stretch_mode = 5 [connection signal="pressed" from="." to="." method="_on_PatternButton_pressed"]