fix: register Cairo converter for bundled overlay
Build AppImage / build-appimage (push) Successful in 42s
Build AppImage / build-appimage (push) Successful in 42s
This commit is contained in:
@@ -5,12 +5,14 @@ import math
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from time import monotonic
|
from time import monotonic
|
||||||
|
|
||||||
import cairo
|
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
|
gi.require_foreign("cairo")
|
||||||
gi.require_version("Gtk", "4.0")
|
gi.require_version("Gtk", "4.0")
|
||||||
gi.require_version("GdkPixbuf", "2.0")
|
gi.require_version("GdkPixbuf", "2.0")
|
||||||
|
|
||||||
|
import cairo
|
||||||
|
|
||||||
from gi.repository import Gdk, GdkPixbuf, GLib, Gtk # noqa: E402
|
from gi.repository import Gdk, GdkPixbuf, GLib, Gtk # noqa: E402
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ class BrandingTests(unittest.TestCase):
|
|||||||
self.assertIn('application_id="dev.korintimer.settings"', main_module)
|
self.assertIn('application_id="dev.korintimer.settings"', main_module)
|
||||||
self.assertIn('application_id="dev.korintimer.overlay"', main_module)
|
self.assertIn('application_id="dev.korintimer.overlay"', main_module)
|
||||||
|
|
||||||
|
def test_overlay_registers_the_cairo_foreign_converter(self) -> None:
|
||||||
|
overlay_module = (ROOT / "src" / "titletimer" / "overlay.py").read_text()
|
||||||
|
|
||||||
|
self.assertIn('gi.require_foreign("cairo")', overlay_module)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user