Skip to content

Commit 591b90f

Browse files
committed
Fixed comment node style in classic theme
1 parent d48f8a2 commit 591b90f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

material_maker/nodes/comment/comment.gd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,13 @@ func _on_title_edit_ready() -> void:
245245
func _on_text_ready() -> void:
246246
%Text.get_menu().about_to_popup.connect(
247247
_context_menu_about_to_popup.bind(%Text.get_menu()))
248+
249+
func _notification(what: int) -> void:
250+
match what:
251+
NOTIFICATION_THEME_CHANGED:
252+
if "classic" in mm_globals.main_window.theme.resource_path:
253+
%Text.add_theme_stylebox_override("normal", StyleBoxEmpty.new())
254+
%Text.add_theme_stylebox_override("read_only", StyleBoxEmpty.new())
255+
else:
256+
%Text.remove_theme_stylebox_override("normal")
257+
%Text.remove_theme_stylebox_override("read_only")

0 commit comments

Comments
 (0)