some changes
This commit is contained in:
11
cht/app.py
11
cht/app.py
@@ -7,7 +7,7 @@ import gi
|
||||
gi.require_version("Gtk", "4.0")
|
||||
gi.require_version("Adw", "1")
|
||||
|
||||
from gi.repository import Gtk, Adw, Gio, GLib
|
||||
from gi.repository import Gtk, Gdk, Adw, Gio, GLib
|
||||
|
||||
from cht.config import APP_ID, APP_NAME
|
||||
from cht.window import ChtWindow
|
||||
@@ -23,6 +23,15 @@ class ChtApp(Adw.Application):
|
||||
def do_activate(self):
|
||||
win = self.props.active_window
|
||||
if not win:
|
||||
css = Gtk.CssProvider()
|
||||
css.load_from_string(
|
||||
".frame-selected { border: 3px solid @accent_color; border-radius: 6px; }"
|
||||
)
|
||||
Gtk.StyleContext.add_provider_for_display(
|
||||
Gdk.Display.get_default(),
|
||||
css,
|
||||
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||
)
|
||||
win = ChtWindow(application=self)
|
||||
win.present()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user