Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions material_maker/nodes/generic/generic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ static func create_parameter_control(p : Dictionary, accept_float_expressions :
control.custom_minimum_size.x = 80
elif p.type == "curve":
control = preload("res://material_maker/widgets/curve_edit/curve_edit.tscn").instantiate()
control.custom_minimum_size.y = 22
elif p.type == "polygon":
control = preload("res://material_maker/widgets/polygon_edit/polygon_edit.tscn").instantiate()
elif p.type == "polyline":
Expand All @@ -343,12 +344,12 @@ static func create_parameter_control(p : Dictionary, accept_float_expressions :
control = preload("res://material_maker/widgets/lattice_edit/lattice_edit.tscn").instantiate()
elif p.type == "string":
control = TextLineEdit.new()
control.custom_minimum_size.x = 80
control.custom_minimum_size = Vector2(80, 22)
elif p.type == "image_path":
control = preload("res://material_maker/widgets/image_picker_button/image_picker_button.tscn").instantiate()
elif p.type == "file":
control = preload("res://material_maker/widgets/file_picker_button/file_picker_button.tscn").instantiate()
control.custom_minimum_size.x = 80
control.custom_minimum_size = Vector2(80, 22)
if p.has("filters"):
for f in p.filters:
control.add_filter(f)
Expand Down
3 changes: 2 additions & 1 deletion material_maker/theme/classic_base.tres
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ MM_LibrarySectionButton/styles/normal = SubResource("StyleBoxFlat_rhqc2")
MM_LibrarySectionButton/styles/pressed = SubResource("StyleBoxFlat_w8nfu")
MM_MainBackground/base_type = &"PanelContainer"
MM_MainBackground/styles/panel = SubResource("StyleBoxFlat_wqwm5")
MM_Node/constants/minimum_line_height = 16
MM_Node/constants/minimum_line_height = 22
MM_NodeCheckbox/base_type = &"Button"
MM_NodeFloatEdit/base_type = &"Button"
MM_NodeFloatEdit/font_sizes/font_size = 15
Expand All @@ -1261,6 +1261,7 @@ MM_NodeGradientEditPopup/base_type = &"PanelContainer"
MM_NodeGradientEditPopup/styles/panel = SubResource("StyleBoxFlat_omwbs")
MM_NodeImageEdit/base_type = &"Button"
MM_NodeOptionEdit/base_type = &"OptionButton"
MM_NodeOptionEdit/font_sizes/font_size = 12
MM_NodeOptionEdit/icons/arrow = SubResource("AtlasTexture_bflk3")
MM_NodeOptionEditPopup/base_type = &"PopupMenu"
MM_NodeOptionEditPopup/styles/hover = SubResource("StyleBoxFlat_ofcpt")
Expand Down
29 changes: 15 additions & 14 deletions material_maker/theme/default.tres
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.490196, 0.505882, 0.545098, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 4

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k8x4n"]
Expand All @@ -283,10 +283,10 @@ content_margin_top = 2.0
content_margin_right = 10.0
content_margin_bottom = 2.0
bg_color = Color(0.168627, 0.176471, 0.192157, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 4

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k7e83"]
Expand All @@ -295,10 +295,10 @@ content_margin_top = 3.0
content_margin_right = 6.0
content_margin_bottom = 3.0
bg_color = Color(0.117647, 0.121569, 0.133333, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 4

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f0kci"]
Expand Down Expand Up @@ -1362,6 +1362,7 @@ LineEdit/colors/font_placeholder_color = Color(0.875, 0.875, 0.875, 0.6)
LineEdit/colors/font_selected_color = Color(1, 1, 1, 1)
LineEdit/colors/font_uneditable_color = Color(0.875, 0.875, 0.875, 0.5)
LineEdit/colors/selection_color = Color(0.5, 0.5, 0.5, 1)
LineEdit/font_sizes/font_size = 13
LineEdit/styles/focus = SubResource("StyleBoxFlat_s437y")
LineEdit/styles/normal = SubResource("StyleBoxFlat_k8x4n")
LineEdit/styles/read_only = SubResource("StyleBoxFlat_k7e83")
Expand Down Expand Up @@ -1473,7 +1474,7 @@ MM_LibrarySectionButton/styles/normal = SubResource("StyleBoxFlat_ck0hb")
MM_LibrarySectionButton/styles/pressed = SubResource("StyleBoxFlat_ck0hb")
MM_MainBackground/base_type = &"PanelContainer"
MM_MainBackground/styles/panel = SubResource("StyleBoxFlat_wqwm5")
MM_Node/constants/minimum_line_height = 20
MM_Node/constants/minimum_line_height = 22
MM_NodeCheckbox/base_type = &"Button"
MM_NodeFloatEdit/base_type = &"Button"
MM_NodeFloatEdit/font_sizes/font_size = 15
Expand All @@ -1495,7 +1496,7 @@ MM_NodeOptionEdit/colors/icon_hover_color = Color(0.933333, 0.678431, 0.909804,
MM_NodeOptionEdit/colors/icon_hover_pressed_color = Color(0.933333, 0.678431, 0.909804, 1)
MM_NodeOptionEdit/colors/icon_normal_color = Color(1, 1, 1, 1)
MM_NodeOptionEdit/colors/icon_pressed_color = Color(0.933333, 0.521569, 0.909804, 1)
MM_NodeOptionEdit/font_sizes/font_size = 15
MM_NodeOptionEdit/font_sizes/font_size = 13
MM_NodeOptionEdit/icons/arrow = SubResource("AtlasTexture_bflk3")
MM_NodeOptionEditPopup/base_type = &"PopupMenu"
MM_NodeOptionEditPopup/styles/hover = SubResource("StyleBoxFlat_3j6py")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var previous_color : Color
signal color_changed_undo(c, previous)

func _ready():
custom_minimum_size = Vector2(24, 24)
custom_minimum_size = Vector2(22, 22)
connect("color_changed",Callable(self,"on_color_changed"))
connect("picker_created",Callable(self,"on_picker_created"))
connect("popup_closed",Callable(self,"on_popup_closed"))
Expand Down
6 changes: 3 additions & 3 deletions material_maker/widgets/curve_edit/curve_edit.tscn
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://cvv8rhglg3jlm"]
[gd_scene format=3 uid="uid://cvv8rhglg3jlm"]

[ext_resource type="Script" uid="uid://cd0ugv3swm5os" path="res://material_maker/widgets/curve_edit/curve_edit.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://yeaj0tj7b08i" path="res://material_maker/widgets/curve_edit/curve_view.tscn" id="2"]

[node name="CurveEdit" type="Button"]
[node name="CurveEdit" type="Button" unique_id=1863414995]
custom_minimum_size = Vector2(60, 20)
anchors_preset = 11
anchor_left = 1.0
Expand All @@ -15,7 +15,7 @@ offset_bottom = -700.0
focus_mode = 1
script = ExtResource("1")

[node name="CurveView" parent="." instance=ExtResource("2")]
[node name="CurveView" parent="." unique_id=611358315 instance=ExtResource("2")]
layout_mode = 1
offset_left = 0.0
offset_top = 0.0
Expand Down
14 changes: 9 additions & 5 deletions material_maker/widgets/float_edit/float_edit.tscn
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
[gd_scene load_steps=3 format=3 uid="uid://rflulhsuy3ax"]
[gd_scene format=3 uid="uid://rflulhsuy3ax"]

[ext_resource type="Script" uid="uid://c4own5hljyjue" path="res://material_maker/widgets/float_edit/float_edit.gd" id="1"]

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_t5q7m"]
content_margin_left = 3.0
content_margin_right = 3.0

[node name="FloatEdit" type="Control"]
[node name="FloatEdit" type="Control" unique_id=268044637]
clip_children = 1
custom_minimum_size = Vector2(60, 20)
custom_minimum_size = Vector2(60, 22)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -29.5
offset_top = -9.5
offset_right = 29.5
offset_bottom = 11.5
grow_horizontal = 2
grow_vertical = 2
theme_type_variation = &"MM_NodeFloatEdit"
script = ExtResource("1")

[node name="Slider" type="ProgressBar" parent="."]
[node name="Slider" type="ProgressBar" parent="." unique_id=935030889]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
Expand All @@ -30,7 +34,7 @@ mouse_filter = 2
value = 30.43
show_percentage = false

[node name="Edit" type="LineEdit" parent="."]
[node name="Edit" type="LineEdit" parent="." unique_id=1883064503]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
Expand Down
18 changes: 10 additions & 8 deletions material_maker/widgets/gradient_editor/gradient_edit.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://cp6ft7qbucfam"]
[gd_scene format=3 uid="uid://cp6ft7qbucfam"]

[ext_resource type="Script" uid="uid://b12ou6mx2bt2m" path="res://material_maker/widgets/gradient_editor/gradient_edit.gd" id="1_51wqf"]

Expand Down Expand Up @@ -26,26 +26,26 @@ code = "shader_type canvas_item;"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_1yahc"]
shader = SubResource("Shader_786ke")

[node name="GradientEdit" type="PanelContainer"]
custom_minimum_size = Vector2(0, 25)
[node name="GradientEdit" type="PanelContainer" unique_id=1523633676]
custom_minimum_size = Vector2(0, 22)
offset_right = 351.0
offset_bottom = 42.0
offset_bottom = 14.0
focus_mode = 2
theme_type_variation = &"MM_NodeGradientEdit"
theme_override_styles/panel = SubResource("StyleBoxFlat_j7yhr")
script = ExtResource("1_51wqf")

[node name="HBoxContainer" type="HBoxContainer" parent="."]
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=1176024547]
layout_mode = 2
theme_override_constants/separation = 0

[node name="PanelContainer" type="Panel" parent="HBoxContainer"]
[node name="PanelContainer" type="Panel" parent="HBoxContainer" unique_id=1275934486]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_e7ak6")

[node name="Gradient" type="ColorRect" parent="HBoxContainer/PanelContainer"]
[node name="Gradient" type="ColorRect" parent="HBoxContainer/PanelContainer" unique_id=1039771332]
unique_name_in_owner = true
material = SubResource("ShaderMaterial_1yahc")
layout_mode = 1
Expand All @@ -57,9 +57,11 @@ grow_vertical = 2
size_flags_horizontal = 3
mouse_filter = 2

[node name="PopupButton" type="Button" parent="HBoxContainer"]
[node name="PopupButton" type="Button" parent="HBoxContainer" unique_id=461355319]
unique_name_in_owner = true
custom_maximum_size = Vector2(-1, 16)
layout_mode = 2
size_flags_vertical = 4
toggle_mode = true
flat = true

Expand Down
4 changes: 2 additions & 2 deletions material_maker/widgets/text_line_edit/text_line_edit.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://ctb1alr2h3jxi"]
[gd_scene format=3 uid="uid://ctb1alr2h3jxi"]

[ext_resource type="Script" uid="uid://bjwrxt2pvhupy" path="res://material_maker/widgets/text_line_edit/text_line_edit.gd" id="1_tiioq"]

[node name="TextLineEdit" type="LineEdit"]
[node name="TextLineEdit" type="LineEdit" unique_id=8227980]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
Expand Down