#include "about_dialog.h" #include #include #include #include #include #include #include namespace { // palette(mid) is meant for 3D bevel/shadow decoration, not text — it has // poor contrast against the window background in dark themes (barely // legible). Blend the widget's actual text and window colors instead, so // the result is reliably readable — de-emphasized relative to full-strength // text, but never low-contrast — in either a light or dark theme. QColor mutedTextColor(const QWidget* widget) { const QPalette pal = widget->palette(); const QColor text = pal.color(QPalette::WindowText); const QColor background = pal.color(QPalette::Window); constexpr qreal kTextWeight = 0.65; auto blend = [kTextWeight](int textChannel, int backgroundChannel) { return qBound(0, qRound(textChannel * kTextWeight + backgroundChannel * (1.0 - kTextWeight)), 255); }; return QColor(blend(text.red(), background.red()), blend(text.green(), background.green()), blend(text.blue(), background.blue())); } } AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent) { setWindowTitle(QStringLiteral("About OrbitHub")); setWindowIcon(QApplication::windowIcon()); resize(760, 560); auto* layout = new QVBoxLayout(this); layout->setContentsMargins(16, 16, 16, 16); layout->setSpacing(12); auto* headerRow = new QHBoxLayout(); headerRow->setSpacing(12); auto* iconLabel = new QLabel(this); iconLabel->setFixedSize(80, 80); iconLabel->setPixmap(QApplication::windowIcon().pixmap(80, 80)); iconLabel->setAlignment(Qt::AlignCenter); auto* titleColumn = new QVBoxLayout(); titleColumn->setSpacing(4); auto* title = new QLabel(QStringLiteral("

OrbitHub

"), this); auto* subtitle = new QLabel( QStringLiteral("Unified remote session manager for SSH, RDP, and VNC workflows."), this); subtitle->setWordWrap(true); subtitle->setStyleSheet(QStringLiteral("color: %1;").arg(mutedTextColor(this).name())); const QString version = QCoreApplication::applicationVersion().trimmed().isEmpty() ? QStringLiteral("Development build") : QCoreApplication::applicationVersion().trimmed(); auto* buildLine = new QLabel( QStringLiteral("Version: %1 | Qt runtime linked dynamically").arg(version), this); buildLine->setStyleSheet(QStringLiteral("color: %1;").arg(mutedTextColor(this).name())); titleColumn->addWidget(title); titleColumn->addWidget(subtitle); titleColumn->addWidget(buildLine); titleColumn->addStretch(); headerRow->addWidget(iconLabel, 0, Qt::AlignTop); headerRow->addLayout(titleColumn, 1); auto* browser = new QTextBrowser(this); browser->setOpenExternalLinks(true); browser->setStyleSheet(QStringLiteral( "QTextBrowser { border: 1px solid palette(midlight); border-radius: 8px; padding: 8px; }")); browser->setHtml(QStringLiteral(R"(

Third-Party Libraries

OrbitHub uses the following external libraries:

LibraryLicenseUpstream
Qt 6 (Widgets / SQL)LGPLv3 / GPLv3 / Commercialqt.io/licensing
KodoTermMITgithub.com/diegoiast/KodoTerm
libvtermMITgithub.com/neovim/libvterm
FreeRDP / WinPRApache License 2.0github.com/FreeRDP/FreeRDP

License Links

License Files In This Repository

  • third_party/KodoTerm/LICENSE
  • third_party/FreeRDP/LICENSE
  • LICENSE (project license)
)")); auto* buttons = new QDialogButtonBox(QDialogButtonBox::Close, this); connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); layout->addLayout(headerRow); layout->addWidget(browser, 1); layout->addWidget(buttons); }