mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Minor UI changes in the tool options of shape tools
This commit is contained in:
parent
0ba940c886
commit
6203b3a71c
|
@ -28,7 +28,7 @@ msgstr ""
|
||||||
msgid "Frame Size"
|
msgid "Frame Size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Size"
|
msgid "Size:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Width:"
|
msgid "Width:"
|
||||||
|
|
|
@ -10,31 +10,39 @@ script = ExtResource( 1 )
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
[node name="ShapeThickness" type="HBoxContainer" parent="." index="2"]
|
[node name="ShapeThickness" type="HBoxContainer" parent="." index="2"]
|
||||||
|
margin_left = 6.0
|
||||||
margin_top = 18.0
|
margin_top = 18.0
|
||||||
margin_right = 116.0
|
margin_right = 110.0
|
||||||
margin_bottom = 42.0
|
margin_bottom = 42.0
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
custom_constants/separation = 0
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="ShapeThickness" index="0"]
|
[node name="Label2" type="Label" parent="ShapeThickness" index="0"]
|
||||||
margin_top = 5.0
|
margin_top = 5.0
|
||||||
margin_right = 26.0
|
margin_right = 30.0
|
||||||
margin_bottom = 19.0
|
margin_bottom = 19.0
|
||||||
text = "Size"
|
text = "Size:"
|
||||||
|
align = 1
|
||||||
|
|
||||||
[node name="ThicknessSpinbox" type="SpinBox" parent="ShapeThickness" index="1"]
|
[node name="ThicknessSpinbox" type="SpinBox" parent="ShapeThickness" index="1"]
|
||||||
margin_left = 30.0
|
margin_left = 30.0
|
||||||
margin_right = 116.0
|
margin_right = 104.0
|
||||||
margin_bottom = 24.0
|
margin_bottom = 24.0
|
||||||
size_flags_horizontal = 3
|
mouse_default_cursor_shape = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
min_value = 1.0
|
min_value = 1.0
|
||||||
value = 1.0
|
value = 1.0
|
||||||
align = 1
|
align = 1
|
||||||
suffix = "px"
|
suffix = "px"
|
||||||
|
|
||||||
[node name="ThicknessSlider" type="HSlider" parent="." index="3"]
|
[node name="ThicknessSlider" type="HSlider" parent="." index="3"]
|
||||||
|
margin_left = 12.0
|
||||||
margin_top = 46.0
|
margin_top = 46.0
|
||||||
margin_right = 116.0
|
margin_right = 104.0
|
||||||
margin_bottom = 62.0
|
margin_bottom = 62.0
|
||||||
size_flags_horizontal = 3
|
rect_min_size = Vector2( 92, 0 )
|
||||||
|
mouse_default_cursor_shape = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 1
|
size_flags_vertical = 1
|
||||||
min_value = 1.0
|
min_value = 1.0
|
||||||
value = 1.0
|
value = 1.0
|
||||||
|
@ -54,10 +62,13 @@ margin_top = 66.0
|
||||||
margin_bottom = 128.0
|
margin_bottom = 128.0
|
||||||
|
|
||||||
[node name="FillCheckbox" type="CheckBox" parent="." index="7"]
|
[node name="FillCheckbox" type="CheckBox" parent="." index="7"]
|
||||||
|
margin_left = 13.0
|
||||||
margin_top = 66.0
|
margin_top = 66.0
|
||||||
margin_right = 116.0
|
margin_right = 102.0
|
||||||
margin_bottom = 90.0
|
margin_bottom = 90.0
|
||||||
hint_tooltip = "Fills the drawn shape with color, instead of drawing a hollow shape"
|
hint_tooltip = "Fills the drawn shape with color, instead of drawing a hollow shape"
|
||||||
|
mouse_default_cursor_shape = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
text = "Fill Shape"
|
text = "Fill Shape"
|
||||||
|
|
||||||
[node name="EmptySpacer" parent="." index="8"]
|
[node name="EmptySpacer" parent="." index="8"]
|
||||||
|
@ -67,6 +78,7 @@ margin_bottom = 106.0
|
||||||
[node name="Mirror" parent="." index="9"]
|
[node name="Mirror" parent="." index="9"]
|
||||||
margin_top = 110.0
|
margin_top = 110.0
|
||||||
margin_bottom = 127.0
|
margin_bottom = 127.0
|
||||||
|
|
||||||
[connection signal="value_changed" from="ShapeThickness/ThicknessSpinbox" to="." method="_on_Thickness_value_changed"]
|
[connection signal="value_changed" from="ShapeThickness/ThicknessSpinbox" to="." method="_on_Thickness_value_changed"]
|
||||||
[connection signal="value_changed" from="ThicknessSlider" to="." method="_on_Thickness_value_changed"]
|
[connection signal="value_changed" from="ThicknessSlider" to="." method="_on_Thickness_value_changed"]
|
||||||
[connection signal="toggled" from="FillCheckbox" to="." method="_on_FillCheckbox_toggled"]
|
[connection signal="toggled" from="FillCheckbox" to="." method="_on_FillCheckbox_toggled"]
|
||||||
|
|
|
@ -341,10 +341,10 @@ func transform_content_confirm() -> void:
|
||||||
return
|
return
|
||||||
var project : Project = Global.current_project
|
var project : Project = Global.current_project
|
||||||
var cel_image : Image = project.frames[project.current_frame].cels[project.current_layer].image
|
var cel_image : Image = project.frames[project.current_frame].cels[project.current_layer].image
|
||||||
cel_image.blit_rect_mask(preview_image, preview_image, Rect2(Vector2.ZERO, Global.current_project.selection_bitmap.get_size()), big_bounding_rectangle.position)
|
cel_image.blit_rect_mask(preview_image, preview_image, Rect2(Vector2.ZERO, project.selection_bitmap.get_size()), big_bounding_rectangle.position)
|
||||||
var selected_bitmap_copy = Global.current_project.selection_bitmap.duplicate()
|
var selected_bitmap_copy = project.selection_bitmap.duplicate()
|
||||||
Global.current_project.move_bitmap_values(selected_bitmap_copy)
|
project.move_bitmap_values(selected_bitmap_copy)
|
||||||
Global.current_project.selection_bitmap = selected_bitmap_copy
|
project.selection_bitmap = selected_bitmap_copy
|
||||||
|
|
||||||
original_preview_image = Image.new()
|
original_preview_image = Image.new()
|
||||||
preview_image = Image.new()
|
preview_image = Image.new()
|
||||||
|
@ -434,8 +434,8 @@ func copy() -> void:
|
||||||
var to_copy := Image.new()
|
var to_copy := Image.new()
|
||||||
if is_moving_content:
|
if is_moving_content:
|
||||||
to_copy.copy_from(preview_image)
|
to_copy.copy_from(preview_image)
|
||||||
var selected_bitmap_copy := Global.current_project.selection_bitmap.duplicate()
|
var selected_bitmap_copy := project.selection_bitmap.duplicate()
|
||||||
Global.current_project.move_bitmap_values(selected_bitmap_copy, false)
|
project.move_bitmap_values(selected_bitmap_copy, false)
|
||||||
clipboard.selection_bitmap = selected_bitmap_copy
|
clipboard.selection_bitmap = selected_bitmap_copy
|
||||||
else:
|
else:
|
||||||
to_copy = image.get_rect(big_bounding_rectangle)
|
to_copy = image.get_rect(big_bounding_rectangle)
|
||||||
|
@ -469,9 +469,9 @@ func paste() -> void:
|
||||||
undo_data = _get_undo_data(true)
|
undo_data = _get_undo_data(true)
|
||||||
var project := Global.current_project
|
var project := Global.current_project
|
||||||
|
|
||||||
original_bitmap = Global.current_project.selection_bitmap.duplicate()
|
original_bitmap = project.selection_bitmap.duplicate()
|
||||||
original_big_bounding_rectangle = big_bounding_rectangle
|
original_big_bounding_rectangle = big_bounding_rectangle
|
||||||
original_offset = Global.current_project.selection_offset
|
original_offset = project.selection_offset
|
||||||
|
|
||||||
project.selection_bitmap = clipboard.selection_bitmap.duplicate()
|
project.selection_bitmap = clipboard.selection_bitmap.duplicate()
|
||||||
self.big_bounding_rectangle = clipboard.big_bounding_rectangle
|
self.big_bounding_rectangle = clipboard.big_bounding_rectangle
|
||||||
|
@ -527,7 +527,7 @@ func invert() -> void:
|
||||||
selection_bitmap_copy = project.resize_bitmap(selection_bitmap_copy, project.size)
|
selection_bitmap_copy = project.resize_bitmap(selection_bitmap_copy, project.size)
|
||||||
project.invert_bitmap(selection_bitmap_copy)
|
project.invert_bitmap(selection_bitmap_copy)
|
||||||
project.selection_bitmap = selection_bitmap_copy
|
project.selection_bitmap = selection_bitmap_copy
|
||||||
Global.current_project.selection_bitmap_changed()
|
project.selection_bitmap_changed()
|
||||||
self.big_bounding_rectangle = project.get_selection_rectangle(selection_bitmap_copy)
|
self.big_bounding_rectangle = project.get_selection_rectangle(selection_bitmap_copy)
|
||||||
project.selection_offset = Vector2.ZERO
|
project.selection_offset = Vector2.ZERO
|
||||||
commit_undo("Rectangle Select", _undo_data)
|
commit_undo("Rectangle Select", _undo_data)
|
||||||
|
|
Loading…
Reference in a new issue