diff options
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") |