feat: live input validation

This commit is contained in:
aclist committed 2026-01-02 06:32:32 +09:00
1 parent 8a1c5bea6c
commit 3c82b71f76
8 files changed
+71 -38

No files matched your search

+8 -1
View File
@@ -11,11 +11,18 @@ def add_class(widget: Gtk.Widget, label: str) -> None:
context = widget.get_style_context()
context.add_class(label)
# TODO: def remove_class()
def remove_class(widget: Gtk.Widget, label: str) -> None:
context = widget.get_style_context()
context.remove_class(label)
def load_css() -> None:
# TODO: consider storing this in a data file
css = """
.invalid-entry {
border-color: red;
}
.frame {
border: 0px;
}