diff options
author | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2025-01-27 22:58:57 +0000 |
---|---|---|
committer | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2025-01-27 22:58:57 +0000 |
commit | 29234ead927f64837fd49cab17cbcf261147ccfa (patch) | |
tree | b6fb70749c5a0d26bfd9f8dd612cf63d65c4f0f4 /src/chat.py | |
parent | 903e32b804eb257ffeb87d76bde373bcb9ac882c (diff) |
chat: Fix spell checking, fix theme of GtkSource widgetHEADspellchecking_sourceviewmain
Diffstat (limited to 'src/chat.py')
-rw-r--r-- | src/chat.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/chat.py b/src/chat.py index d7f1ce8..1635faa 100644 --- a/src/chat.py +++ b/src/chat.py @@ -26,6 +26,7 @@ from weegtk import config from weegtk import netfile import json +import os GObject.type_register(GtkSource.View) @Gtk.Template(resource_path='/com/fryzekconcepts/weegtk/gtk/chat.ui') @@ -68,6 +69,12 @@ class WeegtkChat(Adw.Bin): adj.connect("value-changed", self.scroll_changes) adj.connect("notify::upper", self.upper_notify) + # This is a bit of hack to have the raised color match in the gtk source editor + manager = GtkSource.StyleSchemeManager().get_default() + scheme = manager.get_scheme('CustomAdwaita') + buffer = self.text_entry.get_buffer() + buffer.set_style_scheme(scheme) + sc_controller = Gtk.ShortcutController(propagation_phase=Gtk.PropagationPhase.CAPTURE) action = Gtk.CallbackAction.new(self.entry_callback, self) trigger = Gtk.ShortcutTrigger.parse_string("Return") |