mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Stretch mode and expand mode fixes (#1103)
* Set dynamics dialog to correct size after something is made visible or hidden
* fixed aspects of brush buttons
* Fixed wrong stretch mode
* improved rotation brush UI
* Update PaintSelect.tscn
* formatting
* fix all stretch modes
* fix export expand mode
* Fix more Stretch modes
* Fixed Resize canvas transparent checker
* removed an addition
The change: 625fe4cdd1
is moved over to a new pr
* moved some changes to another pr
* Moved some more changes to another pr
This commit is contained in:
parent
d4d5f32429
commit
b5ded76654
|
@ -98,7 +98,7 @@ layout_mode = 0
|
||||||
offset_right = 32.0
|
offset_right = 32.0
|
||||||
offset_bottom = 32.0
|
offset_bottom = 32.0
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="BrushSize" parent="Brush" index="1" instance=ExtResource("1")]
|
[node name="BrushSize" parent="Brush" index="1" instance=ExtResource("1")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
|
@ -100,7 +100,7 @@ layout_mode = 0
|
||||||
offset_right = 32.0
|
offset_right = 32.0
|
||||||
offset_bottom = 32.0
|
offset_bottom = 32.0
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="OffsetX" parent="FillPattern" index="1" instance=ExtResource("1")]
|
[node name="OffsetX" parent="FillPattern" index="1" instance=ExtResource("1")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
|
@ -46,7 +46,7 @@ layout_mode = 0
|
||||||
offset_right = 32.0
|
offset_right = 32.0
|
||||||
offset_bottom = 32.0
|
offset_bottom = 32.0
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="BrushSize" parent="Brush" index="1" instance=ExtResource("3")]
|
[node name="BrushSize" parent="Brush" index="1" instance=ExtResource("3")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
|
@ -21,7 +21,7 @@ offset_right = -2.0
|
||||||
offset_bottom = -2.0
|
offset_bottom = -2.0
|
||||||
pivot_offset = Vector2(16, 16)
|
pivot_offset = Vector2(16, 16)
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="TransparentChecker" parent="BrushTexture" instance=ExtResource("1")]
|
[node name="TransparentChecker" parent="BrushTexture" instance=ExtResource("1")]
|
||||||
show_behind_parent = true
|
show_behind_parent = true
|
||||||
|
|
|
@ -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]
|
[sub_resource type="StyleBoxFlat" id="1"]
|
||||||
bg_color = Color( 1, 1, 1, 1 )
|
bg_color = Color(1, 1, 1, 1)
|
||||||
border_color = Color( 1, 1, 1, 1 )
|
border_color = Color(1, 1, 1, 1)
|
||||||
corner_radius_top_left = 5
|
corner_radius_top_left = 5
|
||||||
corner_radius_top_right = 5
|
corner_radius_top_right = 5
|
||||||
corner_radius_bottom_right = 5
|
corner_radius_bottom_right = 5
|
||||||
corner_radius_bottom_left = 5
|
corner_radius_bottom_left = 5
|
||||||
anti_aliasing = false
|
anti_aliasing = false
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id=1]
|
[sub_resource type="StyleBoxFlat" id="2"]
|
||||||
bg_color = Color( 1, 1, 1, 1 )
|
bg_color = Color(1, 1, 1, 1)
|
||||||
border_color = Color( 1, 1, 1, 1 )
|
border_color = Color(1, 1, 1, 1)
|
||||||
corner_radius_top_left = 5
|
corner_radius_top_left = 5
|
||||||
corner_radius_top_right = 5
|
corner_radius_top_right = 5
|
||||||
corner_radius_bottom_right = 5
|
corner_radius_bottom_right = 5
|
||||||
|
@ -21,25 +21,23 @@ corner_radius_bottom_left = 5
|
||||||
anti_aliasing = false
|
anti_aliasing = false
|
||||||
|
|
||||||
[node name="PatternButton" type="Button"]
|
[node name="PatternButton" type="Button"]
|
||||||
|
custom_minimum_size = Vector2(32, 32)
|
||||||
offset_right = 32.0
|
offset_right = 32.0
|
||||||
offset_bottom = 32.0
|
offset_bottom = 32.0
|
||||||
custom_minimum_size = Vector2( 32, 32 )
|
theme_override_styles/focus = SubResource("1")
|
||||||
theme_override_styles/hover = SubResource( 2 )
|
theme_override_styles/disabled = SubResource("1")
|
||||||
theme_override_styles/pressed = SubResource( 2 )
|
theme_override_styles/hover = SubResource("2")
|
||||||
theme_override_styles/focus = SubResource( 1 )
|
theme_override_styles/pressed = SubResource("2")
|
||||||
theme_override_styles/disabled = SubResource( 1 )
|
theme_override_styles/normal = SubResource("2")
|
||||||
theme_override_styles/normal = SubResource( 2 )
|
|
||||||
button_mask = 7
|
button_mask = 7
|
||||||
script = ExtResource( 2 )
|
script = ExtResource("2")
|
||||||
|
|
||||||
[node name="PatternTexture" type="TextureRect" parent="."]
|
[node name="PatternTexture" type="TextureRect" parent="."]
|
||||||
|
custom_minimum_size = Vector2(32, 32)
|
||||||
|
layout_mode = 0
|
||||||
offset_right = 32.0
|
offset_right = 32.0
|
||||||
offset_bottom = 32.0
|
offset_bottom = 32.0
|
||||||
custom_minimum_size = Vector2( 32, 32 )
|
expand_mode = 1
|
||||||
expand = true
|
stretch_mode = 5
|
||||||
stretch_mode = 6
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[connection signal="pressed" from="." to="." method="_on_PatternButton_pressed"]
|
[connection signal="pressed" from="." to="." method="_on_PatternButton_pressed"]
|
||||||
|
|
|
@ -163,6 +163,7 @@ func create_preview_container() -> VBoxContainer:
|
||||||
|
|
||||||
func create_preview_rect() -> TextureRect:
|
func create_preview_rect() -> TextureRect:
|
||||||
var preview := TextureRect.new()
|
var preview := TextureRect.new()
|
||||||
|
preview.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
|
||||||
preview.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
preview.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||||
preview.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
preview.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||||
preview.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
preview.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||||
|
|
|
@ -35,7 +35,7 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
texture = ExtResource("4")
|
texture = ExtResource("4")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="VBoxContainer"]
|
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -45,7 +45,7 @@ size_flags_vertical = 3
|
||||||
custom_minimum_size = Vector2(200, 200)
|
custom_minimum_size = Vector2(200, 200)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 5
|
stretch_mode = 4
|
||||||
|
|
||||||
[node name="TransparentChecker" parent="VBoxContainer/AspectRatioContainer/Preview" instance=ExtResource("2")]
|
[node name="TransparentChecker" parent="VBoxContainer/AspectRatioContainer/Preview" instance=ExtResource("2")]
|
||||||
show_behind_parent = true
|
show_behind_parent = true
|
||||||
|
|
|
@ -101,12 +101,9 @@ layout_mode = 2
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="TransparentChecker" parent="VBoxContainer/AspectRatioContainer/Preview" instance=ExtResource("1")]
|
[node name="TransparentChecker" parent="VBoxContainer/AspectRatioContainer" instance=ExtResource("1")]
|
||||||
show_behind_parent = true
|
show_behind_parent = true
|
||||||
layout_mode = 0
|
layout_mode = 2
|
||||||
anchors_preset = 0
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
|
|
||||||
[connection signal="about_to_popup" from="." to="." method="_on_ResizeCanvas_about_to_show"]
|
[connection signal="about_to_popup" from="." to="." method="_on_ResizeCanvas_about_to_show"]
|
||||||
[connection signal="confirmed" from="." to="." method="_on_ResizeCanvas_confirmed"]
|
[connection signal="confirmed" from="." to="." method="_on_ResizeCanvas_confirmed"]
|
||||||
|
|
|
@ -30,7 +30,7 @@ material = SubResource("1")
|
||||||
custom_minimum_size = Vector2(200, 200)
|
custom_minimum_size = Vector2(200, 200)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 5
|
stretch_mode = 4
|
||||||
|
|
||||||
[node name="TransparentChecker" parent="VBoxContainer/AspectRatioContainer/Preview" instance=ExtResource("2")]
|
[node name="TransparentChecker" parent="VBoxContainer/AspectRatioContainer/Preview" instance=ExtResource("2")]
|
||||||
show_behind_parent = true
|
show_behind_parent = true
|
||||||
|
|
|
@ -58,7 +58,7 @@ offset_right = 10.0
|
||||||
offset_bottom = 10.5
|
offset_bottom = 10.5
|
||||||
texture = ExtResource("1")
|
texture = ExtResource("1")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="Settings" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
|
[node name="Settings" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
@ -79,7 +79,7 @@ offset_top = -10.5
|
||||||
offset_right = 10.0
|
offset_right = 10.0
|
||||||
offset_bottom = 10.5
|
offset_bottom = 10.5
|
||||||
texture = ExtResource("3")
|
texture = ExtResource("3")
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="OpenFolder" type="Button" parent="ScrollContainer/CenterContainer/GridContainer"]
|
[node name="OpenFolder" type="Button" parent="ScrollContainer/CenterContainer/GridContainer"]
|
||||||
custom_minimum_size = Vector2(32, 32)
|
custom_minimum_size = Vector2(32, 32)
|
||||||
|
@ -97,7 +97,7 @@ offset_top = 3.0
|
||||||
offset_right = -3.0
|
offset_right = -3.0
|
||||||
offset_bottom = -3.0
|
offset_bottom = -3.0
|
||||||
texture = ExtResource("4")
|
texture = ExtResource("4")
|
||||||
stretch_mode = 6
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="OptionsDialog" type="AcceptDialog" parent="."]
|
[node name="OptionsDialog" type="AcceptDialog" parent="."]
|
||||||
position = Vector2i(0, 36)
|
position = Vector2i(0, 36)
|
||||||
|
|
Loading…
Reference in a new issue