Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scales for some dialog/pop-ups on hi-dpi display #780

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
69c82a2
fix some dialog/pop-up scales on hi-dpi displays
williamchange Mar 17, 2025
1155d4d
fix pixels and polygon editor scales
williamchange Mar 17, 2025
d95f3a3
create library dialog and color picker scales fix
williamchange Mar 17, 2025
b7e37a2
scale fix for comment color pop-up & login dialog
williamchange Mar 17, 2025
be7fe76
fix comment color chooser popup location & scale
williamchange Mar 17, 2025
d3033e5
fix share material/node dialog scales
williamchange Mar 17, 2025
c00652d
fix node editor scale
williamchange Mar 17, 2025
0118b72
fix node desc. dialog scale
williamchange Mar 17, 2025
54d39e4
fix splines editor dialog scale
williamchange Mar 17, 2025
4afe9d7
fix lattice dialog scale
williamchange Mar 17, 2025
f2e838a
fix render counter menu location
williamchange Mar 17, 2025
d2da43a
fix pop-up menu location for hidpi displays
williamchange Mar 17, 2025
85e29e5
fix environment editor scale
williamchange Mar 18, 2025
88621af
Fix define aliases dialog scale
williamchange Mar 18, 2025
4425921
fix enum editor dialog scale
williamchange Mar 18, 2025
a26d4d7
fix guides color picker scale
williamchange Mar 18, 2025
4c8e074
fix new paint project dialog scale
williamchange Mar 18, 2025
ac7050c
fix paint layers config popup scale/pos
williamchange Mar 18, 2025
a283d07
fix graph tree(hierarchy) dialog scale
williamchange Mar 18, 2025
4035a09
fix paint layers add menu pos
williamchange Mar 18, 2025
6b27fd6
adjust min width so all controls are visible
williamchange Mar 19, 2025
8397547
fix about dialog scale
williamchange Mar 21, 2025
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
Prev Previous commit
Next Next commit
fix graph tree(hierarchy) dialog scale
williamchange committed Mar 18, 2025

Verified

This commit was signed with the committer’s verified signature.
commit a283d077a634aeb8524abfc10c6a03b35e968d16
4 changes: 4 additions & 0 deletions material_maker/widgets/graph_tree/graph_tree.gd
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@ signal item_icon_double_clicked(generator)

@onready var tree = $Tree

func _ready() -> void:
content_scale_factor = mm_globals.main_window.get_window().content_scale_factor
min_size = Vector2(500, 500) * content_scale_factor

func init(graph_name : String, generator : MMGenGraph) -> void:
tree.clear()
var root : TreeItem = tree.create_item(null)
4 changes: 2 additions & 2 deletions material_maker/widgets/graph_tree/graph_tree.tscn
Original file line number Diff line number Diff line change
@@ -52,14 +52,14 @@ Tree/styles/title_button_normal = null
Tree/styles/title_button_pressed = null

[node name="GraphTree" type="Popup"]
offset_right = 335.0
offset_bottom = 339.0
script = ExtResource("1")

[node name="Tree" type="Tree" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
theme = SubResource("2")

[connection signal="ready" from="." to="." method="_ready"]
[connection signal="item_activated" from="Tree" to="." method="_on_Tree_item_double_clicked"]
[connection signal="item_icon_double_clicked" from="Tree" to="." method="_on_Tree_item_double_clicked"]