forked from clan/clan-core
Merge pull request 'UI: Fixed style.css not working when installed' (#828) from Qubasa-main into main
This commit is contained in:
commit
e0ed00ef5c
@ -1,10 +1,11 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
|
||||||
from typing import Any, ClassVar
|
from typing import Any, ClassVar
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
|
from clan_vm_manager import assets
|
||||||
|
|
||||||
gi.require_version("Gtk", "4.0")
|
gi.require_version("Gtk", "4.0")
|
||||||
gi.require_version("Adw", "1")
|
gi.require_version("Adw", "1")
|
||||||
|
|
||||||
@ -86,7 +87,9 @@ class MainApplication(Adw.Application):
|
|||||||
|
|
||||||
# TODO: For css styling
|
# TODO: For css styling
|
||||||
def init_style(self) -> None:
|
def init_style(self) -> None:
|
||||||
resource_path = Path(__file__).parent / "style.css"
|
resource_path = assets.loc / "style.css"
|
||||||
|
|
||||||
|
log.debug(f"Style css path: {resource_path}")
|
||||||
css_provider = Gtk.CssProvider()
|
css_provider = Gtk.CssProvider()
|
||||||
css_provider.load_from_path(str(resource_path))
|
css_provider.load_from_path(str(resource_path))
|
||||||
Gtk.StyleContext.add_provider_for_display(
|
Gtk.StyleContext.add_provider_for_display(
|
||||||
|
@ -25,7 +25,8 @@ mkShell {
|
|||||||
set -eou pipefail
|
set -eou pipefail
|
||||||
DESKTOP_DST=~/.local/share/applications/clan-vm-manager.desktop
|
DESKTOP_DST=~/.local/share/applications/clan-vm-manager.desktop
|
||||||
DESKTOP_SRC=${clan-vm-manager}/share/applications/clan-vm-manager.desktop
|
DESKTOP_SRC=${clan-vm-manager}/share/applications/clan-vm-manager.desktop
|
||||||
UI_BIN=${clan-vm-manager}/bin/clan-vm-manager
|
# UI_BIN="env GTK_DEBUG=interactive ${clan-vm-manager}/bin/clan-vm-manager"
|
||||||
|
UI_BIN="${clan-vm-manager}/bin/clan-vm-manager"
|
||||||
|
|
||||||
cp -f $DESKTOP_SRC $DESKTOP_DST
|
cp -f $DESKTOP_SRC $DESKTOP_DST
|
||||||
sleep 2
|
sleep 2
|
||||||
|
Loading…
Reference in New Issue
Block a user