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
10 changes: 9 additions & 1 deletion material_maker/theme/classic_base.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=143 format=3 uid="uid://w487nirev8y5"]
[gd_resource type="Theme" load_steps=144 format=3 uid="uid://w487nirev8y5"]

[ext_resource type="Texture2D" uid="uid://1s0c37uoj4rf" path="res://material_maker/theme/default_theme_icons.svg" id="1_fw8f4"]
[ext_resource type="FontFile" uid="uid://lro0qdrhfytt" path="res://material_maker/theme/font_rubik/Rubik-Light.ttf" id="3_h5b0q"]
Expand Down Expand Up @@ -612,6 +612,12 @@ corner_detail = 4
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5e0gw"]
content_margin_top = 3.0

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vbdqj"]
content_margin_left = 8.0
content_margin_top = 8.0
content_margin_right = 8.0
content_margin_bottom = 8.0

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_u368o"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wc6mb"]
Expand Down Expand Up @@ -1068,6 +1074,8 @@ MM_PanelMenuSubPanelLabel/base_type = &"Label"
MM_PanelMenuSubPanelLabel/colors/font_color = Color(0.881937, 0.881937, 0.881937, 1)
MM_PanelMenuSubPanelLabel/font_sizes/font_size = 15
MM_PanelMenuSubPanelLabel/styles/normal = SubResource("StyleBoxEmpty_5e0gw")
MM_PreferenceTab/base_type = &"ScrollContainer"
MM_PreferenceTab/styles/panel = SubResource("StyleBoxEmpty_vbdqj")
MM_ProjectsBackground/base_type = &"Panel"
MM_ProjectsBackground/styles/panel = SubResource("StyleBoxEmpty_u368o")
MM_Reroute/base_type = &"GraphNode"
Expand Down
10 changes: 9 additions & 1 deletion material_maker/theme/default.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=165 format=3 uid="uid://b628lwfk6ig2c"]
[gd_resource type="Theme" load_steps=166 format=3 uid="uid://b628lwfk6ig2c"]

[ext_resource type="FontFile" uid="uid://lro0qdrhfytt" path="res://material_maker/theme/font_rubik/Rubik-Light.ttf" id="1_5tfb1"]
[ext_resource type="Texture2D" uid="uid://1s0c37uoj4rf" path="res://material_maker/theme/default_theme_icons.svg" id="1_s43fy"]
Expand Down Expand Up @@ -814,6 +814,12 @@ corner_detail = 4
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5e0gw"]
content_margin_top = 3.0

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_rqlqa"]
content_margin_left = 8.0
content_margin_top = 8.0
content_margin_right = 8.0
content_margin_bottom = 8.0

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1k0sx"]
bg_color = Color(0.0941176, 0.0980392, 0.101961, 1)
corner_radius_top_right = 4
Expand Down Expand Up @@ -1349,6 +1355,8 @@ MM_PanelMenuSubPanelLabel/base_type = &"Label"
MM_PanelMenuSubPanelLabel/colors/font_color = Color(0.556, 0.556, 0.556, 1)
MM_PanelMenuSubPanelLabel/font_sizes/font_size = 15
MM_PanelMenuSubPanelLabel/styles/normal = SubResource("StyleBoxEmpty_5e0gw")
MM_PreferenceTab/base_type = &"ScrollContainer"
MM_PreferenceTab/styles/panel = SubResource("StyleBoxEmpty_rqlqa")
MM_ProjectsBackground/base_type = &"Panel"
MM_ProjectsBackground/styles/panel = SubResource("StyleBoxFlat_1k0sx")
MM_Reroute/base_type = &"GraphNode"
Expand Down
2 changes: 2 additions & 0 deletions material_maker/windows/preferences/bool_option.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
extends CheckBox

class_name BoolOption

@export var config_variable : String

func _ready() -> void:
Expand Down
2 changes: 1 addition & 1 deletion material_maker/windows/preferences/bool_option.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://drg0s4lftblx3"]

[ext_resource type="Script" path="res://material_maker/windows/preferences/bool_option.gd" id="1"]
[ext_resource type="Script" uid="uid://r578e00kfyhy" path="res://material_maker/windows/preferences/bool_option.gd" id="1"]

[node name="BooleanOption" type="CheckBox"]
offset_right = 308.0
Expand Down
2 changes: 2 additions & 0 deletions material_maker/windows/preferences/float_option.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
extends "res://material_maker/widgets/float_edit/float_edit.gd"

class_name FloatOption

@export var config_variable : String

func _ready() -> void:
Expand Down
20 changes: 5 additions & 15 deletions material_maker/windows/preferences/preferences.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func edit_preferences(c : ConfigFile) -> void:
main_window.add_dialog(self)
config_changed.connect(main_window.on_config_changed)
update_controls(self)
size = $VBoxContainer.get_combined_minimum_size() * content_scale_factor
size *= content_scale_factor
hide()
popup_centered(size)

Expand Down Expand Up @@ -42,16 +42,6 @@ func _on_OK_pressed():
func _on_Cancel_pressed():
queue_free()


func _on_Preferences_about_to_show():
await get_tree().process_frame
_on_VBoxContainer_minimum_size_changed()

func _on_VBoxContainer_minimum_size_changed():
min_size = $VBoxContainer.get_combined_minimum_size() * content_scale_factor
size = min_size


func _on_InstallLanguage_pressed():
var dialog = load("res://material_maker/windows/file_dialog/file_dialog.tscn").instantiate()
dialog.min_size = Vector2(500, 500)
Expand All @@ -65,8 +55,8 @@ func _on_InstallLanguage_pressed():
update_language_list()

func update_language_list():
$VBoxContainer/TabContainer/General/HBoxContainer/Language.init_from_locales()
$VBoxContainer/TabContainer/General/HBoxContainer/Language.init_from_config(config)
%Language.init_from_locales()
%Language.init_from_config(config)

func _on_DownloadLanguage_pressed():
var download_popup = load("res://material_maker/windows/preferences/language_download.tscn").instantiate()
Expand All @@ -80,5 +70,5 @@ func _on_DownloadLanguage_closed():


func _on_ready() -> void:
$VBoxContainer/TabContainer/General/WinTabletDriverSpacer.visible = OS.get_name() == "Windows"
$VBoxContainer/TabContainer/General/WinTabletDriver.visible = OS.get_name() == "Windows"
%WinTabletDriver.visible = OS.get_name() == "Windows"
%WinTabletDriverSpacer.visible = OS.get_name() == "Windows"
Loading