diff --git a/tools/chatgui/src/statuspage.cpp b/tools/chatgui/src/statuspage.cpp index c0449884..935601bd 100644 --- a/tools/chatgui/src/statuspage.cpp +++ b/tools/chatgui/src/statuspage.cpp @@ -26,21 +26,21 @@ StatusPage::StatusPage(UtunNode* node, QWidget* parent) , m_node(node) { auto* layout = new QVBoxLayout(this); - layout->setSpacing(8); + layout->setSpacing(2); layout->setContentsMargins(0, 0, 0, 0); /* ── clock block ── */ m_clockFrame = new QFrame(this); m_clockFrame->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); m_clockFrame->setStyleSheet( - "QFrame { border: 1px solid palette(mid); border-radius: 6px;" - " padding: 10px; background: palette(alternate-base); }"); + "QFrame { border: 1px solid palette(mid); border-radius: 2px;" + " padding: 1px; background: palette(alternate-base); }"); auto* clockLayout = new QVBoxLayout(m_clockFrame); - clockLayout->setContentsMargins(12, 8, 12, 8); + clockLayout->setContentsMargins(4, 0, 4, 0); m_clockLabel = new QLabel("--:--:--", m_clockFrame); - QFont clockFont("monospace", 22); + QFont clockFont("monospace", 20); clockFont.setBold(true); m_clockLabel->setFont(clockFont); m_clockLabel->setAlignment(Qt::AlignCenter); diff --git a/tools/chatgui/transport/chat_core.c b/tools/chatgui/transport/chat_core.c index 95e27863..312abd68 100644 --- a/tools/chatgui/transport/chat_core.c +++ b/tools/chatgui/transport/chat_core.c @@ -835,7 +835,7 @@ static void chat_core_collect_status(void) { off += snprintf(buf + off, sizeof(buf) - off, "=== NTP ===\n"); off += snprintf(buf + off, sizeof(buf) - off, "Enabled: %s\n", ntp->enabled ? "yes" : "no"); off += snprintf(buf + off, sizeof(buf) - off, "Synced: %s\n", ntp->synced ? "yes" : "no"); - off += snprintf(buf + off, sizeof(buf) - off, "Offset: %lld us\n", (long long)ntp->offset_us); + off += snprintf(buf + off, sizeof(buf) - off, "Offset: %.1f s\n", ntp->offset_us / 1000000.0); if (ntp->server_count > 0 && ntp->servers) { off += snprintf(buf + off, sizeof(buf) - off, "Servers: %d\n", ntp->server_count); for (int i = 0; i < ntp->server_count && ntp->servers[i]; i++) @@ -847,8 +847,6 @@ static void chat_core_collect_status(void) { uint64_t ago_sec = (now_tb - ntp->last_sync_tb) / 10000; off += snprintf(buf + off, sizeof(buf) - off, "Last sync: %llu sec ago\n", (unsigned long long)ago_sec); } - off += snprintf(buf + off, sizeof(buf) - off, "\n"); - /* ─── Connections ─── */ int conn_count = 0; struct ll_entry* entry = g_cc.inst->connections->head;