updated icons

This commit is contained in:
2026-03-31 13:35:22 -05:00
parent e686cb60aa
commit b669e6349d
26 changed files with 35 additions and 1413 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

1
app/icons/bitcoind.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

1
app/icons/electrs.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

1
app/icons/lnd.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

1
app/icons/mempool.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

1
app/icons/nextcloud.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

1
app/icons/rtl.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

1
app/icons/synapse.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

1
app/icons/wordpress.svg Normal file

File diff suppressed because one or more lines are too long

View File

@@ -19,6 +19,9 @@ LOADING_STATES = {"reloading", "activating", "deactivating", "maintenance"}
# Icon directory injected by the Nix derivation via environment variable # Icon directory injected by the Nix derivation via environment variable
ICON_DIR = os.environ.get("SOVRAN_HUB_ICONS", "") ICON_DIR = os.environ.get("SOVRAN_HUB_ICONS", "")
# Supported icon extensions in priority order
ICON_EXTENSIONS = [".svg", ".png"]
class ServiceTile(Gtk.Box): class ServiceTile(Gtk.Box):
"""A square tile showing a service logo, name, status, toggle, and restart.""" """A square tile showing a service logo, name, status, toggle, and restart."""
@@ -106,12 +109,22 @@ class ServiceTile(Gtk.Box):
self.refresh() self.refresh()
def _set_logo(self, icon_name: str): def _set_logo(self, icon_name: str):
"""Set the tile logo from a PNG in the icons dir, or fall back to a symbolic icon.""" """Set the tile logo from an SVG or PNG in the icons dir."""
if icon_name and ICON_DIR: if icon_name and ICON_DIR:
png_path = os.path.join(ICON_DIR, f"{icon_name}.png") for ext in ICON_EXTENSIONS:
if os.path.isfile(png_path): icon_path = os.path.join(ICON_DIR, f"{icon_name}{ext}")
if os.path.isfile(icon_path):
if ext == ".svg":
# GTK4 handles SVGs natively via GdkPixbuf
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale( pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
png_path, 48, 48, True icon_path, 48, 48, True
)
texture = Gdk.Texture.new_for_pixbuf(pixbuf)
self._logo.set_from_paintable(texture)
else:
# PNG path
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
icon_path, 48, 48, True
) )
texture = Gdk.Texture.new_for_pixbuf(pixbuf) texture = Gdk.Texture.new_for_pixbuf(pixbuf)
self._logo.set_from_paintable(texture) self._logo.set_from_paintable(texture)

View File

@@ -67,6 +67,7 @@ let
pkgs.libadwaita pkgs.libadwaita
pkgs.gobject-introspection pkgs.gobject-introspection
pkgs.gdk-pixbuf pkgs.gdk-pixbuf
pkgs.librsvg
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
@@ -85,7 +86,7 @@ let
cp style.css $out/lib/sovran-hub/style.css cp style.css $out/lib/sovran-hub/style.css
# Copy logos from the repo (no fetchurl needed) # Copy logos from the repo (no fetchurl needed)
cp icons/*.png $out/share/sovran-hub/icons/ cp icons/* $out/share/sovran-hub/icons/ 2>/dev/null || true
# Install the generated config # Install the generated config
cp ${generatedConfig} $out/lib/sovran-hub/config.json cp ${generatedConfig} $out/lib/sovran-hub/config.json