diff --git a/app/sovran_systemsos_hub/application.py b/app/sovran_systemsos_hub/application.py index a42b6ce..e257b0b 100644 --- a/app/sovran_systemsos_hub/application.py +++ b/app/sovran_systemsos_hub/application.py @@ -66,7 +66,6 @@ REBOOT_COMMAND = [ ] UPDATE_CHECK_INTERVAL = 1800 - TILE_GRID_WIDTH = 820 @@ -374,8 +373,8 @@ class SovranHubWindow(Adw.ApplicationWindow): super().__init__( application=app, title="Sovran_SystemsOS Hub", - default_width=680, - default_height=780, + default_width=860, + default_height=800, ) self._config = config self._tiles = [] @@ -487,7 +486,6 @@ class SovranHubWindow(Adw.ApplicationWindow): GLib.timeout_add_seconds(5, self._check_for_updates_once) GLib.timeout_add_seconds(UPDATE_CHECK_INTERVAL, self._periodic_update_check) - GLib.timeout_add_seconds(1, self._fetch_ips_once) # ── IP Address Bar ─────────────────────────────────────────── @@ -515,7 +513,7 @@ class SovranHubWindow(Adw.ApplicationWindow): ) internal_label = Gtk.Label( label="Internal:", - css_classes=["ip-label", "dim-label"], + css_classes=["dim-label"], ) self._internal_ip_label = Gtk.Label( label="…", @@ -539,7 +537,7 @@ class SovranHubWindow(Adw.ApplicationWindow): ) external_label = Gtk.Label( label="External:", - css_classes=["ip-label", "dim-label"], + css_classes=["dim-label"], ) self._external_ip_label = Gtk.Label( label="…", @@ -556,6 +554,17 @@ class SovranHubWindow(Adw.ApplicationWindow): return bar + def _fetch_ips_once(self): + thread = threading.Thread(target=self._do_fetch_ips, daemon=True) + thread.start() + return False + + def _do_fetch_ips(self): + internal = _get_internal_ip() + GLib.idle_add(self._internal_ip_label.set_label, internal) + external = _get_external_ip() + GLib.idle_add(self._external_ip_label.set_label, external) + # ── Title box ──────────────────────────────────────────────── def _build_title_box(self): @@ -715,4 +724,4 @@ class SovranHubApp(Adw.Application): win = self.get_active_window() if not win: win = SovranHubWindow(self, self._config) - win.present() + win.present() \ No newline at end of file diff --git a/app/style.css b/app/style.css index 2d4aaf9..a5f1d74 100644 --- a/app/style.css +++ b/app/style.css @@ -1,12 +1,9 @@ -/* ── Tile (locked dimensions) ──────────────────────────────── */ +/* ── Tile (locked dimensions via GTK min-width/height only) ── */ .sovran-tile { border-radius: 18px; padding: 0px; min-width: 180px; - max-width: 180px; min-height: 210px; - max-height: 210px; - overflow: hidden; transition: box-shadow 200ms ease-in-out; } .sovran-tile:hover { @@ -15,16 +12,13 @@ /* ── Tile text ─────────────────────────────────────────────── */ .tile-name { - font-size: 1.0em; font-weight: bold; } .tile-status { - font-size: 0.9em; } /* ── Section headers ───────────────────────────────────────── */ .section-header { - font-size: 1.3em; font-weight: bold; } @@ -36,25 +30,21 @@ /* ── Header / role ─────────────────────────────────────────── */ .hub-title { - font-size: 1.2em; font-weight: bold; } .role-badge { padding: 2px 8px; border-radius: 4px; - font-size: 0.85em; } /* ── Update indicator ──────────────────────────────────────── */ .update-badge { color: #2ec27e; - font-size: 1.3em; font-weight: bold; } .update-available { background: #2ec27e; color: white; - font-size: 1.0em; } .update-available:hover { background: #26a269; @@ -66,13 +56,9 @@ border-radius: 10px; background: alpha(@card_bg_color, 0.5); } -.ip-label { - font-size: 0.95em; -} .ip-value { font-family: monospace; font-weight: bold; - font-size: 1.0em; color: @accent_color; }