The mark recoloured each theme's corner art, which was thin and often hard to see. Now it's a filled corner tab with a contrasting outline, the same in every theme; collapsed groups show it too. Groups without a colour are blue everywhere (was the theme's highlight gold). Colour menus for cards, threads and groups end with a full colour picker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
740 B
GDScript
19 lines
740 B
GDScript
class_name ColourDialog
|
|
extends RefCounted
|
|
## "Any colour…" from a right-click Colour menu: a pop-up with a full colour
|
|
## picker (wheel, sliders and hex code). Choose calls `on_pick` with "#rrggbb".
|
|
|
|
|
|
static func open(main: Main, start: String, on_pick: Callable) -> ModalCard:
|
|
var dialog := ModalCard.new("Choose a colour", 360.0)
|
|
var picker := ColorPicker.new()
|
|
picker.edit_alpha = false
|
|
picker.color = Color.from_string(start, GroupMark.DEFAULT_COLOR)
|
|
picker.presets_visible = false
|
|
dialog.body.add_child(picker)
|
|
dialog.add_button("Cancel", "plain", dialog.close)
|
|
dialog.add_button("Choose", "primary", func() -> void:
|
|
dialog.close()
|
|
on_pick.call("#" + picker.color.to_html(false)))
|
|
main.add_child(dialog)
|
|
return dialog
|