Skip to content

Commit c9193d1

Browse files
authored
Merge pull request #741 from voylin/FixGDPaintDemo
Fixing GD Paint Issues in 4.0-dev
2 parents 92e24ce + 948db28 commit c9193d1

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

2d/gd_paint/paint_root.tscn

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=5 format=3 uid="uid://bhjmyer4wlwy2"]
1+
[gd_scene load_steps=6 format=3 uid="uid://bhjmyer4wlwy2"]
22

33
[ext_resource type="Script" path="res://paint_control.gd" id="1"]
44
[ext_resource type="Script" path="res://tools_panel.gd" id="2"]
@@ -7,17 +7,22 @@
77
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4ksjc"]
88
bg_color = Color(1, 1, 1, 1)
99

10+
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_npkcn"]
11+
bg_color = Color(0.2, 0.2, 0.2, 1)
12+
1013
[node name="PaintRoot" type="Control"]
1114
anchor_right = 1.0
1215
anchor_bottom = 1.0
1316

1417
[node name="DrawingAreaBG" type="Panel" parent="."]
15-
offset_left = 350.0
16-
offset_right = 1024.0
17-
offset_bottom = 600.0
18+
anchor_left = 0.342
19+
anchor_right = 1.0
20+
anchor_bottom = 1.0
21+
offset_left = -0.208008
22+
grow_horizontal = 2
1823
theme_override_styles/panel = SubResource( "StyleBoxFlat_4ksjc" )
19-
metadata/_edit_layout_mode = 0
20-
metadata/_edit_use_custom_anchors = false
24+
metadata/_edit_layout_mode = 1
25+
metadata/_edit_use_custom_anchors = true
2126

2227
[node name="PaintControl" type="Control" parent="."]
2328
anchor_right = 1.0
@@ -34,9 +39,10 @@ position = Vector2(350, 0)
3439
[node name="ToolsPanel" type="Panel" parent="."]
3540
offset_right = 350.0
3641
offset_bottom = 600.0
42+
theme_override_styles/panel = SubResource( "StyleBoxFlat_npkcn" )
3743
script = ExtResource( "2" )
38-
metadata/_edit_layout_mode = 0
39-
metadata/_edit_use_custom_anchors = false
44+
metadata/_edit_layout_mode = 1
45+
metadata/_edit_use_custom_anchors = true
4046

4147
[node name="LabelTools" type="Label" parent="ToolsPanel"]
4248
offset_left = 20.0

2d/gd_paint/project.godot

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ gdscript/warnings/redundant_await=false
2424

2525
[display]
2626

27-
window/size/window_width_override=1280
28-
window/size/window_height_override=720
29-
window/stretch/mode="canvas_items"
27+
window/stretch/mode="viewport"
28+
window/stretch/aspect="keep_height"
3029

3130
[rendering]
3231

0 commit comments

Comments
 (0)