diff --git a/CMakeLists.txt b/CMakeLists.txt
index e990cd5..f9f3860 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
-project(alg-app-store VERSION 0.2.28 LANGUAGES CXX)
+project(alg-app-store VERSION 0.2.30 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -72,6 +72,7 @@ set(HEADERS
add_executable(${PROJECT_NAME}
${SOURCES}
${HEADERS}
+ resources.qrc
)
# Link libraries
@@ -103,15 +104,3 @@ install(TARGETS ${PROJECT_NAME}
install(FILES assets/alg-app-store.desktop
DESTINATION share/applications
)
-
-# Copy stylesheet to build directory
-configure_file(
- ${CMAKE_SOURCE_DIR}/stylesheet.qss
- ${CMAKE_BINARY_DIR}/stylesheet.qss
- COPYONLY
-)
-
-# Install stylesheet
-install(FILES stylesheet.qss
- DESTINATION share/alg-app-store
-)
diff --git a/resource/icons/check.svg b/resource/icons/check.svg
new file mode 100644
index 0000000..4657403
--- /dev/null
+++ b/resource/icons/check.svg
@@ -0,0 +1 @@
+
diff --git a/resource/icons/chevron-down.svg b/resource/icons/chevron-down.svg
new file mode 100644
index 0000000..0ebfe8f
--- /dev/null
+++ b/resource/icons/chevron-down.svg
@@ -0,0 +1 @@
+
diff --git a/resource/styles/base.qss b/resource/styles/base.qss
new file mode 100644
index 0000000..70f36ba
--- /dev/null
+++ b/resource/styles/base.qss
@@ -0,0 +1,124 @@
+/* ============================================================
+ Base — global palette, typography, and window chrome
+ ------------------------------------------------------------
+ Palette:
+ Window bg #1e1e1e
+ Surface #242424 (menu bar, tab bar, group boxes)
+ Card #262626
+ Raised/hover #2d2d2d - #3a3a3a
+ Border #303030 (subtle) / #3a3a3a (default) / #4a4a4a (strong)
+ Text #f2f2f2 (primary) / #a0a0a0 (secondary) / #6e6e6e (dim)
+ Accent #3b82f6 (ALG blue), hover #60a5fa
+ Success #4ade80 Error #f87171
+ ============================================================ */
+
+* {
+ font-family: "Inter", "Cantarell", "Segoe UI", "Roboto", sans-serif;
+ color: #f2f2f2;
+}
+
+QMainWindow, QDialog, QWidget {
+ background-color: #1e1e1e;
+}
+
+QLabel {
+ background-color: transparent;
+}
+
+#view-title {
+ font-size: 24px;
+ font-weight: bold;
+ color: #f2f2f2;
+ margin-bottom: 10px;
+}
+
+QToolTip {
+ background-color: #242424;
+ color: #d8d8d8;
+ border: 1px solid #3a3a3a;
+ border-radius: 6px;
+ padding: 6px 8px;
+}
+
+QToolTip QLabel {
+ background-color: transparent;
+ color: #d8d8d8;
+}
+
+QMenu {
+ background-color: #242424;
+ border: 1px solid #3a3a3a;
+ padding: 6px;
+}
+
+QMenu::item {
+ background-color: transparent;
+ color: #f2f2f2;
+ padding: 6px 24px 6px 12px;
+ border-radius: 6px;
+}
+
+QMenu::item:selected {
+ background-color: #303030;
+}
+
+QMenu::item:disabled {
+ color: #6e6e6e;
+}
+
+QMenu::separator {
+ height: 1px;
+ background-color: #3a3a3a;
+ margin: 6px 8px;
+}
+
+QMessageBox QLabel {
+ background-color: transparent;
+}
+
+/* ---- Scrollbars (shared chrome) ---- */
+
+QScrollBar:vertical {
+ background-color: transparent;
+ width: 12px;
+ margin: 0;
+}
+
+QScrollBar::handle:vertical {
+ background-color: #454545;
+ border-radius: 3px;
+ min-height: 30px;
+ margin: 4px 3px;
+}
+
+QScrollBar::handle:vertical:hover {
+ background-color: #5a5a5a;
+}
+
+QScrollBar:horizontal {
+ background-color: transparent;
+ height: 12px;
+ margin: 0;
+}
+
+QScrollBar::handle:horizontal {
+ background-color: #454545;
+ border-radius: 3px;
+ min-width: 30px;
+ margin: 3px 4px;
+}
+
+QScrollBar::handle:horizontal:hover {
+ background-color: #5a5a5a;
+}
+
+QScrollBar::add-line, QScrollBar::sub-line {
+ width: 0;
+ height: 0;
+ background: none;
+ border: none;
+}
+
+QScrollBar::add-page, QScrollBar::sub-page {
+ background: transparent;
+}
diff --git a/resource/styles/components.qss b/resource/styles/components.qss
new file mode 100644
index 0000000..65332bc
--- /dev/null
+++ b/resource/styles/components.qss
@@ -0,0 +1,354 @@
+/* ============================================================
+ Components — buttons, inputs, indicators, progress, text roles
+ ============================================================ */
+
+/* ---- Buttons ---- */
+
+QPushButton {
+ background-color: #303030;
+ color: #f2f2f2;
+ border: 1px solid #3a3a3a;
+ border-radius: 8px;
+ padding: 8px 18px;
+ font-weight: 500;
+}
+
+QPushButton:hover {
+ background-color: #3a3a3a;
+ border: 1px solid #4a4a4a;
+}
+
+QPushButton:pressed {
+ background-color: #262626;
+}
+
+QPushButton:disabled {
+ background-color: #262626;
+ color: #6e6e6e;
+ border: 1px solid #2d2d2d;
+}
+
+/* Primary action button (Search, Update All, Install) */
+QPushButton[class="primary-btn"] {
+ background-color: #3b82f6;
+ color: #ffffff;
+ border: 1px solid #3b82f6;
+ font-weight: 600;
+}
+
+QPushButton[class="primary-btn"]:hover {
+ background-color: #4f8ff7;
+ border: 1px solid #60a5fa;
+}
+
+QPushButton[class="primary-btn"]:pressed {
+ background-color: #2f6fd6;
+}
+
+QPushButton[class="primary-btn"]:disabled {
+ background-color: #262626;
+ color: #6e6e6e;
+ border: 1px solid #2d2d2d;
+}
+
+/* Destructive action button (Uninstall) */
+QPushButton[class="danger-btn"] {
+ background-color: transparent;
+ color: #f87171;
+ border: 1px solid #5c2e2e;
+}
+
+QPushButton[class="danger-btn"]:hover {
+ background-color: rgba(248, 113, 113, 10%);
+ border: 1px solid #7a3b3b;
+}
+
+QPushButton[class="danger-btn"]:pressed {
+ background-color: rgba(248, 113, 113, 16%);
+}
+
+QPushButton[class="danger-btn"]:disabled {
+ background-color: #262626;
+ color: #6e6e6e;
+ border: 1px solid #2d2d2d;
+}
+
+QPushButton[class="link-button"] {
+ background: none;
+ border: none;
+ color: #3b82f6;
+ text-decoration: underline;
+ font-size: 11px;
+ padding: 4px;
+}
+
+QPushButton[class="link-button"]:hover {
+ color: #60a5fa;
+}
+
+QPushButton[class="command-selector-btn"] {
+ background-color: #262626;
+ color: #f2f2f2;
+ border: 1px solid #3a3a3a;
+ border-radius: 6px;
+ padding: 6px 16px;
+}
+
+QPushButton[class="command-selector-btn"]:hover {
+ background-color: #303030;
+}
+
+QPushButton[class="command-selector-btn"]:checked {
+ background-color: rgba(59, 130, 246, 18%);
+ color: #ffffff;
+ border: 1px solid #3b82f6;
+ font-weight: 600;
+}
+
+/* ---- Text inputs ---- */
+
+QLineEdit {
+ background-color: #262626;
+ color: #f2f2f2;
+ border: 1px solid #3a3a3a;
+ border-radius: 8px;
+ padding: 8px 12px;
+ selection-background-color: #3b82f6;
+ selection-color: #ffffff;
+}
+
+QLineEdit:focus {
+ border: 1px solid #3b82f6;
+}
+
+QLineEdit:disabled {
+ background-color: #242424;
+ color: #6e6e6e;
+ border: 1px solid #2d2d2d;
+}
+
+/* ---- Combo box ---- */
+
+QComboBox {
+ background-color: #303030;
+ color: #f2f2f2;
+ border: 1px solid #3a3a3a;
+ border-radius: 8px;
+ padding: 7px 12px;
+}
+
+QComboBox:hover {
+ border: 1px solid #4a4a4a;
+}
+
+QComboBox:on {
+ border: 1px solid #3b82f6;
+}
+
+QComboBox::drop-down {
+ border: none;
+ width: 28px;
+ subcontrol-origin: padding;
+ subcontrol-position: center right;
+}
+
+QComboBox::down-arrow {
+ image: url(:/resource/icons/chevron-down.svg);
+ width: 14px;
+ height: 14px;
+}
+
+QComboBox QAbstractItemView {
+ background-color: #242424;
+ color: #f2f2f2;
+ border: 1px solid #3a3a3a;
+ padding: 6px;
+ selection-background-color: #303030;
+ selection-color: #ffffff;
+ outline: none;
+}
+
+/* ---- Check boxes and radio buttons ---- */
+
+QCheckBox, QRadioButton {
+ background-color: transparent;
+ spacing: 8px;
+}
+
+QCheckBox:disabled, QRadioButton:disabled {
+ color: #8a8a8a;
+}
+
+QCheckBox::indicator {
+ width: 18px;
+ height: 18px;
+ border-radius: 5px;
+ border: 1px solid #4a4a4a;
+ background-color: #262626;
+}
+
+QCheckBox::indicator:hover {
+ border: 1px solid #5a5a5a;
+}
+
+QCheckBox::indicator:checked {
+ background-color: #3b82f6;
+ border: 1px solid #3b82f6;
+ image: url(:/resource/icons/check.svg);
+}
+
+QCheckBox::indicator:checked:disabled {
+ background-color: #3f3f3f;
+ border: 1px solid #3f3f3f;
+}
+
+QCheckBox::indicator:unchecked:disabled {
+ background-color: #262626;
+ border: 1px solid #303030;
+}
+
+QRadioButton::indicator {
+ width: 16px;
+ height: 16px;
+ border-radius: 9px;
+ border: 1px solid #4a4a4a;
+ background-color: #262626;
+}
+
+QRadioButton::indicator:hover {
+ border: 1px solid #5a5a5a;
+}
+
+QRadioButton::indicator:checked {
+ width: 8px;
+ height: 8px;
+ border-radius: 9px;
+ border: 5px solid #3b82f6;
+ background-color: #ffffff;
+}
+
+/* ---- Progress bars ---- */
+
+QProgressBar {
+ border: none;
+ border-radius: 5px;
+ background-color: #262626;
+ color: #f2f2f2;
+ text-align: center;
+ font-size: 11px;
+}
+
+QProgressBar::chunk {
+ border-radius: 5px;
+ background-color: #3b82f6;
+}
+
+/* ---- Text roles ---- */
+
+.secondary-text {
+ color: #a0a0a0;
+ font-size: 12px;
+}
+
+.dim-text {
+ color: #6e6e6e;
+ font-size: 11px;
+}
+
+QLabel.status-msg-info {
+ color: #3b82f6;
+ padding: 10px;
+}
+
+QLabel.status-msg-success {
+ color: #4ade80;
+ padding: 10px;
+ font-weight: bold;
+}
+
+QLabel.status-msg-error {
+ color: #f87171;
+ padding: 10px;
+}
+
+QLabel.settings-description {
+ color: #a0a0a0;
+ margin-bottom: 10px;
+}
+
+QLabel.settings-info-italic {
+ color: #8a8a8a;
+ font-style: italic;
+ margin-top: 10px;
+}
+
+QLabel.settings-help-text {
+ color: #8a8a8a;
+ font-size: 11px;
+ margin-top: 5px;
+ margin-left: 10px;
+}
+
+QLabel.settings-section-label {
+ font-weight: 600;
+}
+
+QLabel#package-count-label {
+ font-size: 13px;
+ color: #a0a0a0;
+}
+
+QLabel#status-message {
+ font-size: 15px;
+ color: #8a8a8a;
+ padding: 20px;
+}
+
+QLabel#card-name {
+ font-size: 15px;
+ font-weight: bold;
+ color: #f2f2f2;
+}
+
+QLabel#card-description {
+ font-size: 12px;
+ color: #b8b8b8;
+}
+
+QLabel#card-version {
+ font-size: 11px;
+ color: #8a8a8a;
+}
+
+QLabel#details-title {
+ font-size: 22px;
+ font-weight: bold;
+ color: #f2f2f2;
+}
+
+QLabel#details-desc {
+ color: #a0a0a0;
+ font-size: 13px;
+}
+
+QLabel#section-header {
+ font-size: 16px;
+ font-weight: 600;
+ color: #f2f2f2;
+}
+
+QLabel.detail-label {
+ color: #8a8a8a;
+ font-size: 11px;
+}
+
+QLabel.detail-value {
+ color: #e8e8e8;
+ font-size: 13px;
+}
+
+QLabel.footer-note {
+ color: #6e6e6e;
+ font-size: 11px;
+ font-style: italic;
+}
diff --git a/resource/styles/containers.qss b/resource/styles/containers.qss
new file mode 100644
index 0000000..e52b0fc
--- /dev/null
+++ b/resource/styles/containers.qss
@@ -0,0 +1,116 @@
+/* ============================================================
+ Containers — cards, list items, group boxes, panels
+ ============================================================ */
+
+QScrollArea {
+ background-color: transparent;
+ border: none;
+}
+
+QScrollArea QLabel {
+ background-color: transparent;
+}
+
+/* ---- Package cards ---- */
+
+QWidget[class="package-card"] {
+ background-color: #262626;
+ border: 1px solid #333333;
+ border-radius: 12px;
+}
+
+QWidget[class="package-card"][hovered="true"] {
+ background-color: #2b2b2b;
+ border: 1px solid #3b82f6;
+}
+
+QWidget[class="package-card"] QLabel {
+ background-color: transparent;
+ border: none;
+}
+
+/* ---- Update list rows ---- */
+
+QWidget[class="update-item"] {
+ background-color: #262626;
+ border: 1px solid #303030;
+ border-radius: 10px;
+}
+
+QWidget[class="update-item"] QLabel {
+ background-color: transparent;
+}
+
+/* ---- Group boxes (Settings) ---- */
+
+QGroupBox {
+ background-color: #242424;
+ border: 1px solid #303030;
+ border-radius: 12px;
+ margin-top: 24px;
+ padding-top: 20px;
+ font-weight: 600;
+}
+
+QGroupBox::title {
+ subcontrol-origin: margin;
+ subcontrol-position: top left;
+ padding: 4px 12px;
+ color: #a0a0a0;
+}
+
+QGroupBox QLabel, QGroupBox QRadioButton, QGroupBox QCheckBox {
+ background-color: transparent;
+}
+
+/* ---- Badges ---- */
+
+QLabel[class="status-badge"] {
+ background-color: rgba(74, 222, 128, 12%);
+ color: #4ade80;
+ border: 1px solid rgba(74, 222, 128, 35%);
+ border-radius: 6px;
+ padding: 2px 8px;
+ font-size: 10px;
+ font-weight: 700;
+}
+
+QLabel[class="repo-badge"] {
+ background-color: rgba(59, 130, 246, 12%);
+ color: #60a5fa;
+ border: 1px solid rgba(59, 130, 246, 30%);
+ border-radius: 6px;
+ padding: 2px 8px;
+ font-size: 10px;
+ font-weight: 600;
+}
+
+/* ---- Monospace panels ---- */
+
+QTextEdit#log-viewer, QTextEdit#details-text-area {
+ background-color: #191919;
+ border: 1px solid #2d2d2d;
+ border-radius: 8px;
+ padding: 8px;
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
+ font-size: 11px;
+ color: #b8b8b8;
+ selection-background-color: #3b82f6;
+ selection-color: #ffffff;
+}
+
+QLabel#command-display {
+ background-color: #191919;
+ color: #e8e8e8;
+ border: 1px solid #2d2d2d;
+ border-radius: 8px;
+ padding: 12px;
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
+ font-size: 13px;
+}
+
+QFrame#details-separator {
+ background-color: #2d2d2d;
+ border: none;
+ max-height: 1px;
+}
diff --git a/resource/styles/navigation.qss b/resource/styles/navigation.qss
new file mode 100644
index 0000000..63fc253
--- /dev/null
+++ b/resource/styles/navigation.qss
@@ -0,0 +1,56 @@
+/* ============================================================
+ Navigation — menu bar and tab bar
+ ============================================================ */
+
+QMenuBar {
+ background-color: #242424;
+ color: #f2f2f2;
+ border-bottom: 1px solid #303030;
+ padding: 4px 8px;
+}
+
+QMenuBar::item {
+ background-color: transparent;
+ padding: 6px 12px;
+ border-radius: 6px;
+}
+
+QMenuBar::item:selected {
+ background-color: #303030;
+}
+
+QMenuBar::item:pressed {
+ background-color: #3a3a3a;
+}
+
+QTabWidget::pane {
+ border: none;
+ background-color: transparent;
+}
+
+QTabBar {
+ background-color: #242424;
+ border-bottom: 1px solid #303030;
+ qproperty-drawBase: 0;
+ outline: none;
+ alignment: center;
+}
+
+QTabBar::tab {
+ background-color: transparent;
+ color: #a0a0a0;
+ padding: 10px 24px;
+ margin: 6px 8px;
+ border-radius: 8px;
+ font-weight: 600;
+}
+
+QTabBar::tab:selected {
+ background-color: #333333;
+ color: #ffffff;
+}
+
+QTabBar::tab:hover:!selected {
+ background-color: #2b2b2b;
+ color: #d0d0d0;
+}
diff --git a/resources.qrc b/resources.qrc
new file mode 100644
index 0000000..c9dcb78
--- /dev/null
+++ b/resources.qrc
@@ -0,0 +1,10 @@
+
+
+ resource/styles/base.qss
+ resource/styles/navigation.qss
+ resource/styles/components.qss
+ resource/styles/containers.qss
+ resource/icons/check.svg
+ resource/icons/chevron-down.svg
+
+
diff --git a/src/core/package_manager.cpp b/src/core/package_manager.cpp
index 5b50364..eeab245 100644
--- a/src/core/package_manager.cpp
+++ b/src/core/package_manager.cpp
@@ -189,7 +189,7 @@ void PackageManager::onProcessOutput() {
void PackageManager::cancelRunningOperation() {
if (m_process && m_process->state() != QProcess::NotRunning) {
- Logger::warning("Cancelling running operation...");
+ Logger::warning("Killing running operation...");
emit operationOutput("\n>>> Operation cancelled by user <<<\n");
// When using pkexec, we need to kill the actual pacman/yay/paru process
diff --git a/src/gui/home_widget.cpp b/src/gui/home_widget.cpp
index cba1315..645ef07 100644
--- a/src/gui/home_widget.cpp
+++ b/src/gui/home_widget.cpp
@@ -31,10 +31,7 @@ void HomeWidget::setupUi() {
auto* mainLayout = new QVBoxLayout(this);
auto* titleLabel = new QLabel("Featured Packages", this);
- auto titleFont = titleLabel->font();
- titleFont.setPointSize(24);
- titleFont.setBold(true);
- titleLabel->setFont(titleFont);
+ titleLabel->setObjectName("view-title");
mainLayout->addWidget(titleLabel);
m_scrollArea->setWidget(m_contentWidget);
diff --git a/src/gui/installed_widget.cpp b/src/gui/installed_widget.cpp
index 075b404..aa45881 100644
--- a/src/gui/installed_widget.cpp
+++ b/src/gui/installed_widget.cpp
@@ -7,6 +7,7 @@
#include
#include
#include
+#include
InstalledWidget::InstalledWidget(QWidget* parent)
: QWidget(parent)
@@ -15,8 +16,16 @@ InstalledWidget::InstalledWidget(QWidget* parent)
, m_contentWidget(new QWidget())
, m_gridLayout(new QGridLayout(m_contentWidget))
, m_statusLabel(new QLabel(this))
- , m_countLabel(new QLabel(this)) {
-
+ , m_countLabel(new QLabel(this))
+ , m_filterTimer(new QTimer(this)) {
+
+ // debounce timer (waits 300ms after last keystroke)
+ m_filterTimer->setSingleShot(true);
+ m_filterTimer->setInterval(300);
+ connect(m_filterTimer, &QTimer::timeout, this, [this]() {
+ filterPackages(m_filterInput->text());
+ });
+
setupUi();
loadInstalledPackages();
}
@@ -28,17 +37,14 @@ void InstalledWidget::setupUi() {
auto* headerLayout = new QHBoxLayout();
auto* titleLabel = new QLabel("Installed Packages", this);
- auto titleFont = titleLabel->font();
- titleFont.setPointSize(24);
- titleFont.setBold(true);
- titleLabel->setFont(titleFont);
- headerLayout->addWidget(titleLabel);
-
+ titleLabel->setObjectName("view-title");
+ headerLayout->addWidget(titleLabel);
headerLayout->addStretch();
- m_countLabel->setStyleSheet("font-size: 14px; color: #888;");
- headerLayout->addWidget(m_countLabel);
-
+ // Counter Label
+ m_countLabel->setObjectName("package-count-label");
+ headerLayout->addWidget(m_countLabel);
+
auto* refreshButton = new QPushButton("Refresh", this);
connect(refreshButton, &QPushButton::clicked, this, &InstalledWidget::refreshPackages);
headerLayout->addWidget(refreshButton);
@@ -54,7 +60,8 @@ void InstalledWidget::setupUi() {
mainLayout->addWidget(m_filterInput);
// Status label
- m_statusLabel->setAlignment(Qt::AlignCenter);
+ m_statusLabel->setObjectName("status-message");
+ m_statusLabel->setAlignment(Qt::AlignCenter);
m_statusLabel->setText("Loading installed packages...");
mainLayout->addWidget(m_statusLabel);
@@ -85,7 +92,7 @@ void InstalledWidget::loadInstalledPackages() {
m_countLabel->setText(QString("%1 packages installed")
.arg(packages.size()));
- displayPackages(packages);
+ filterPackages(m_filterInput->text());
Logger::info(QString("Loaded %1 installed packages").arg(packages.size()));
}, Qt::QueuedConnection);
@@ -159,16 +166,18 @@ void InstalledWidget::filterPackages(const QString& query) {
}
void InstalledWidget::onFilterTextChanged(const QString& text) {
- filterPackages(text);
+ Q_UNUSED(text);
+ m_filterTimer->start();
}
void InstalledWidget::onPackageClicked(const PackageInfo& info) {
Logger::info(QString("Package clicked: %1").arg(info.name));
auto* dialog = new PackageDetailsDialog(info, this);
- dialog->exec();
+ if(dialog->exec() == QDialog::Accepted) {
+ // Refresh after dialog closes in case package was uninstalled
+ refreshPackages();
+ }
+
dialog->deleteLater();
-
- // Refresh after dialog closes in case package was uninstalled
- refreshPackages();
}
diff --git a/src/gui/installed_widget.h b/src/gui/installed_widget.h
index d4cbe0b..e5e03e4 100644
--- a/src/gui/installed_widget.h
+++ b/src/gui/installed_widget.h
@@ -6,6 +6,7 @@
#include
#include
#include
+#include
#include
#include "../utils/types.h"
@@ -42,6 +43,8 @@ class InstalledWidget : public QWidget {
QVector m_allPackages;
QVector m_filteredPackages;
+
+ QTimer* m_filterTimer;
private slots:
void onPackageClicked(const PackageInfo& info);
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index dd71d18..01caaa8 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -77,6 +77,9 @@ void MainWindow::setupUi() {
m_settingsWidget->isChaoticAurEnabled()
);
+ m_tabWidget->setDocumentMode(true);
+ m_tabWidget->tabBar()->setExpanding(true);
+
m_tabWidget->setTabPosition(QTabWidget::North);
m_tabWidget->setMovable(false);
@@ -117,7 +120,7 @@ void MainWindow::createMenuBar() {
QMessageBox::about(this, "About ALG App Store",
"ALG App Store (Beta)\n\n"
"A modern package manager for Arch Linux\n"
- "Version: 0.2.28\n"
+ "Version: 0.2.30\n"
"Built with Qt6 and C++17\n\n"
"© 2025 Arka Linux GUI");
});
@@ -125,24 +128,31 @@ void MainWindow::createMenuBar() {
}
void MainWindow::loadStyleSheet() {
- QFile styleFile(":/stylesheet.qss");
-
- if (!styleFile.exists()) {
- // Try loading from current directory (for development)
- styleFile.setFileName("stylesheet.qss");
- }
-
- if (!styleFile.exists()) {
- // Try loading from system installation path
- styleFile.setFileName("/usr/share/alg-app-store/stylesheet.qss");
+ QStringList styleFiles = {
+ ":/resource/styles/base.qss",
+ ":/resource/styles/navigation.qss",
+ ":/resource/styles/components.qss",
+ ":/resource/styles/containers.qss"
+ };
+
+ QString combinedStyleSheet;
+ bool anyLoaded = false;
+
+ for (const QString &path : styleFiles) {
+ QFile file(path);
+ if (file.open(QFile::ReadOnly | QFile::Text)) {
+ combinedStyleSheet += QLatin1String(file.readAll());
+ file.close();
+ anyLoaded = true;
+ } else {
+ Logger::warning(QString("Could not load style module: %1").arg(path));
+ }
}
-
- if (styleFile.open(QFile::ReadOnly)) {
- QString styleSheet = QLatin1String(styleFile.readAll());
- qApp->setStyleSheet(styleSheet);
- styleFile.close();
- Logger::info(QString("Stylesheet loaded successfully from: %1").arg(styleFile.fileName()));
+
+ if (anyLoaded) {
+ qApp->setStyleSheet(combinedStyleSheet);
+ Logger::info("Modular stylesheets loaded and combined successfully from resources.");
} else {
- Logger::warning("Could not load stylesheet");
+ Logger::error("Failed to load any stylesheet modules from resources!");
}
}
diff --git a/src/gui/package_card.cpp b/src/gui/package_card.cpp
index 62cdee8..0da8c7c 100644
--- a/src/gui/package_card.cpp
+++ b/src/gui/package_card.cpp
@@ -4,6 +4,9 @@
#include
#include
#include
+#include
+#include
+#include
PackageCard::PackageCard(const PackageInfo& info, QWidget* parent)
: QWidget(parent)
@@ -34,12 +37,9 @@ void PackageCard::setupUi() {
auto* headerLayout = new QHBoxLayout();
m_nameLabel->setText(m_info.name);
- m_nameLabel->setWordWrap(false);
+ m_nameLabel->setObjectName("card-name");
+ m_nameLabel->setWordWrap(false);
m_nameLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
- auto nameFont = m_nameLabel->font();
- nameFont.setPointSize(14);
- nameFont.setBold(true);
- m_nameLabel->setFont(nameFont);
headerLayout->addWidget(m_nameLabel, 1);
m_statusLabel->setProperty("class", "status-badge");
@@ -50,7 +50,8 @@ void PackageCard::setupUi() {
// Description - with word wrap and proper sizing
m_descriptionLabel->setText(m_info.description);
- m_descriptionLabel->setWordWrap(true);
+ m_descriptionLabel->setObjectName("card-description");
+ m_descriptionLabel->setWordWrap(true);
m_descriptionLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_descriptionLabel->setMinimumHeight(40);
m_descriptionLabel->setMaximumHeight(70);
@@ -58,12 +59,9 @@ void PackageCard::setupUi() {
// Version
m_versionLabel->setText(QString("Version: %1").arg(m_info.version));
- auto versionFont = m_versionLabel->font();
- versionFont.setPointSize(9);
- m_versionLabel->setFont(versionFont);
- m_versionLabel->setStyleSheet("color: #888;");
- mainLayout->addWidget(m_versionLabel, 0);
-
+ m_versionLabel->setObjectName("card-version");
+ mainLayout->addWidget(m_versionLabel, 0);
+
// Repository badge
m_repositoryLabel->setText(m_info.repository);
m_repositoryLabel->setProperty("class", "repo-badge");
@@ -109,3 +107,10 @@ void PackageCard::leaveEvent(QEvent* event) {
style()->polish(this);
QWidget::leaveEvent(event);
}
+
+void PackageCard::paintEvent(QPaintEvent*) {
+ QStyleOption opt;
+ opt.initFrom(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
+}
diff --git a/src/gui/package_card.h b/src/gui/package_card.h
index bdb6f86..ca6fc27 100644
--- a/src/gui/package_card.h
+++ b/src/gui/package_card.h
@@ -4,6 +4,7 @@
#include
#include
#include
+#include
#include "../utils/types.h"
/**
@@ -30,7 +31,8 @@ class PackageCard : public QWidget {
void mousePressEvent(QMouseEvent* event) override;
void enterEvent(QEnterEvent* event) override;
void leaveEvent(QEvent* event) override;
-
+ void paintEvent(QPaintEvent*) override;
+
private:
void setupUi();
diff --git a/src/gui/package_details_dialog.cpp b/src/gui/package_details_dialog.cpp
index cacebce..a50c355 100644
--- a/src/gui/package_details_dialog.cpp
+++ b/src/gui/package_details_dialog.cpp
@@ -18,6 +18,10 @@
#include
#include
#include
+#include
+#include
+#include
+#include
PackageDetailsDialog::PackageDetailsDialog(const PackageInfo& info, QWidget* parent)
: QDialog(parent)
@@ -83,29 +87,19 @@ void PackageDetailsDialog::setupUi() {
// Header with name and repository badge
auto* headerLayout = new QHBoxLayout();
-
m_nameLabel->setText(m_info.name);
- m_nameLabel->setContentsMargins(0, 0, 0, 0);
- auto nameFont = m_nameLabel->font();
- nameFont.setPointSize(20);
- nameFont.setBold(true);
- m_nameLabel->setFont(nameFont);
+ m_nameLabel->setObjectName("details-title");
headerLayout->addWidget(m_nameLabel);
-
headerLayout->addStretch();
// Repository badge (member so we can update it later)
m_repositoryLabel->setText(m_info.repository);
m_repositoryLabel->setProperty("class", "repo-badge");
- m_repositoryLabel->setStyleSheet("background-color: #27272a; color: #a1a1aa; "
- "border-radius: 4px; padding: 6px 12px; font-size: 12px;");
headerLayout->addWidget(m_repositoryLabel);
// Installed status badge (hidden by default)
m_statusBadge->setText("Installed");
m_statusBadge->setProperty("class", "status-badge");
- m_statusBadge->setStyleSheet("background-color: #16a34a; color: #ffffff; "
- "border-radius: 4px; padding: 6px 10px; font-size: 12px;");
m_statusBadge->hide();
headerLayout->addWidget(m_statusBadge);
@@ -113,19 +107,19 @@ void PackageDetailsDialog::setupUi() {
// Description right under the name
auto* descLabel = new QLabel(m_info.description, this);
+ descLabel->setObjectName("details-desc");
descLabel->setWordWrap(true);
- descLabel->setStyleSheet("color: #a1a1aa; font-size: 13px;");
mainLayout->addWidget(descLabel);
// Separator line
auto* line1 = new QFrame(this);
line1->setFrameShape(QFrame::HLine);
- line1->setStyleSheet("background-color: #27272a;");
+ line1->setObjectName("details-separator");
mainLayout->addWidget(line1);
// Package Details section - 2x2 grid layout
auto* detailsTitle = new QLabel("Package Details", this);
- detailsTitle->setStyleSheet("font-size: 16px; font-weight: bold;");
+ detailsTitle->setObjectName("section-header");
mainLayout->addWidget(detailsTitle);
auto* infoWidget = new QWidget(this);
@@ -137,18 +131,18 @@ void PackageDetailsDialog::setupUi() {
// Version (top-left)
auto* versionTitle = new QLabel("Version", this);
- versionTitle->setStyleSheet("color: #a1a1aa; font-size: 12px;");
+ versionTitle->setProperty("class", "detail-label");
m_versionLabel->setText(m_info.version);
- m_versionLabel->setStyleSheet("font-size: 13px;");
+ m_versionLabel->setProperty("class", "detail-value");
infoGrid->addWidget(versionTitle, 0, 0, Qt::AlignTop);
infoGrid->addWidget(m_versionLabel, 0, 1);
// Maintainer (top-right)
if (!m_info.maintainer.isEmpty()) {
auto* maintainerTitle = new QLabel("Maintainer", this);
- maintainerTitle->setStyleSheet("color: #a1a1aa; font-size: 12px;");
+ maintainerTitle->setProperty("class", "detail-label");
m_maintainerLabel->setText(m_info.maintainer);
- m_maintainerLabel->setStyleSheet("font-size: 13px;");
+ m_maintainerLabel->setProperty("class", "detail-value");
infoGrid->addWidget(maintainerTitle, 0, 2, Qt::AlignTop);
infoGrid->addWidget(m_maintainerLabel, 0, 3);
}
@@ -156,13 +150,13 @@ void PackageDetailsDialog::setupUi() {
// Upstream URL (bottom-left)
if (!m_info.upstreamUrl.isEmpty()) {
auto* urlTitle = new QLabel("Upstream URL", this);
- urlTitle->setStyleSheet("color: #a1a1aa; font-size: 12px;");
- m_urlLabel->setText(QString("%1")
+ urlTitle->setProperty("class", "detail-label");
+ m_urlLabel->setText(QString("%1")
.arg(m_info.upstreamUrl));
m_urlLabel->setOpenExternalLinks(true);
m_urlLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
m_urlLabel->setWordWrap(true);
- m_urlLabel->setStyleSheet("font-size: 13px;");
+ m_urlLabel->setProperty("class", "detail-value");
infoGrid->addWidget(urlTitle, 1, 0, Qt::AlignTop);
infoGrid->addWidget(m_urlLabel, 1, 1);
}
@@ -170,9 +164,9 @@ void PackageDetailsDialog::setupUi() {
// Last Updated (bottom-right)
if (!m_info.lastUpdated.isNull()) {
auto* updatedTitle = new QLabel("Last Updated", this);
- updatedTitle->setStyleSheet("color: #a1a1aa; font-size: 12px;");
+ updatedTitle->setProperty("class", "detail-label");
m_lastUpdatedLabel->setText(m_info.lastUpdated.toString("MMM. d, yyyy, h a"));
- m_lastUpdatedLabel->setStyleSheet("font-size: 13px;");
+ m_lastUpdatedLabel->setProperty("class", "detail-value");
infoGrid->addWidget(updatedTitle, 1, 2, Qt::AlignTop);
infoGrid->addWidget(m_lastUpdatedLabel, 1, 3);
}
@@ -182,20 +176,19 @@ void PackageDetailsDialog::setupUi() {
// Separator line
auto* line2 = new QFrame(this);
line2->setFrameShape(QFrame::HLine);
- line2->setStyleSheet("background-color: #27272a;");
+ line2->setObjectName("details-separator");
mainLayout->addWidget(line2);
// Dependencies section
if (!m_info.dependList.isEmpty()) {
auto* depsTitle = new QLabel("Dependencies", this);
- depsTitle->setStyleSheet("font-size: 16px; font-weight: bold;");
+ depsTitle->setObjectName("section-header");
mainLayout->addWidget(depsTitle);
m_dependenciesText->setPlainText(m_info.dependList.join("\n"));
m_dependenciesText->setReadOnly(true);
m_dependenciesText->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- m_dependenciesText->setStyleSheet("background-color: #18181b; border: 1px solid #27272a; "
- "border-radius: 6px; padding: 8px; font-size: 12px;");
+ m_dependenciesText->setObjectName("details-text-area");
// Adjust height to fit all dependencies without scrolling
QFontMetrics fm(m_dependenciesText->font());
@@ -210,13 +203,13 @@ void PackageDetailsDialog::setupUi() {
// Separator line
auto* line3 = new QFrame(this);
line3->setFrameShape(QFrame::HLine);
- line3->setStyleSheet("background-color: #27272a;");
- mainLayout->addWidget(line3);
+ line3->setObjectName("details-separator");
+ mainLayout->addWidget(line3);
}
// Command section
auto* commandTitle = new QLabel("Command", this);
- commandTitle->setStyleSheet("font-size: 16px; font-weight: bold;");
+ commandTitle->setObjectName("section-header");
mainLayout->addWidget(commandTitle);
// Command buttons and text
@@ -236,16 +229,12 @@ void PackageDetailsDialog::setupUi() {
auto* yayButton = new QPushButton("yay", this);
yayButton->setCheckable(true);
yayButton->setChecked(true);
- yayButton->setStyleSheet("QPushButton { background-color: #27272a; color: #fafafa; "
- "border: none; border-radius: 4px; padding: 6px 16px; }"
- "QPushButton:checked { background-color: #3b82f6; }");
-
+ yayButton->setProperty("class", "command-selector-btn");
+
auto* paruButton = new QPushButton("paru", this);
paruButton->setCheckable(true);
- paruButton->setStyleSheet("QPushButton { background-color: #27272a; color: #fafafa; "
- "border: none; border-radius: 4px; padding: 6px 16px; }"
- "QPushButton:checked { background-color: #3b82f6; }");
-
+ paruButton->setProperty("class", "command-selector-btn");
+
buttonLayout->addWidget(yayButton);
buttonLayout->addWidget(paruButton);
buttonLayout->addStretch();
@@ -255,9 +244,8 @@ void PackageDetailsDialog::setupUi() {
command = QString("yay -S %1").arg(m_info.name);
auto* commandText = new QLabel(this);
commandText->setText(command);
- commandText->setStyleSheet("background-color: #27272a; color: #fafafa; "
- "border-radius: 6px; padding: 12px; font-family: monospace; font-size: 13px;");
- commandText->setTextInteractionFlags(Qt::TextSelectableByMouse);
+ commandText->setObjectName("command-display");
+ commandText->setTextInteractionFlags(Qt::TextSelectableByMouse);
commandLayout->addWidget(commandText);
// Connect buttons to update command
@@ -275,25 +263,29 @@ void PackageDetailsDialog::setupUi() {
} else {
// Show pacman for official repos
+ auto* buttonLayout = new QHBoxLayout();
+
auto* pacmanButton = new QPushButton("pacman", this);
pacmanButton->setCheckable(true);
pacmanButton->setChecked(true);
- pacmanButton->setStyleSheet("QPushButton { background-color: #3b82f6; color: #fafafa; "
- "border: none; border-radius: 4px; padding: 6px 16px; }");
- commandLayout->addWidget(pacmanButton, 0, Qt::AlignLeft);
-
+ pacmanButton->setProperty("class", "command-selector-btn");
+
+ buttonLayout->addWidget(pacmanButton);
+ buttonLayout->addStretch();
+
+ commandLayout->addLayout(buttonLayout);
+
command = QString("sudo pacman -S %1").arg(m_info.name);
auto* commandText = new QLabel(command, this);
- commandText->setStyleSheet("background-color: #27272a; color: #fafafa; "
- "border-radius: 6px; padding: 12px; font-family: monospace; font-size: 13px;");
- commandText->setTextInteractionFlags(Qt::TextSelectableByMouse);
+ commandText->setObjectName("command-display");
+ commandText->setTextInteractionFlags(Qt::TextSelectableByMouse);
commandLayout->addWidget(commandText);
}
mainLayout->addWidget(commandWidget);
auto* noteLabel = new QLabel("Please ensure your system meets the minimum requirements before installation.", contentWidget);
- noteLabel->setStyleSheet("color: #71717a; font-size: 11px; font-style: italic;");
+ noteLabel->setProperty("class", "footer-note");
noteLabel->setWordWrap(true);
mainLayout->addWidget(noteLabel);
@@ -312,11 +304,13 @@ void PackageDetailsDialog::setupUi() {
m_installButton->setMinimumWidth(100);
m_installButton->setMinimumHeight(35);
+ m_installButton->setProperty("class", "primary-btn");
connect(m_installButton, &QPushButton::clicked, this, &PackageDetailsDialog::onInstall);
buttonLayout->addWidget(m_installButton);
m_uninstallButton->setMinimumWidth(100);
m_uninstallButton->setMinimumHeight(35);
+ m_uninstallButton->setProperty("class", "danger-btn");
connect(m_uninstallButton, &QPushButton::clicked, this, &PackageDetailsDialog::onUninstall);
buttonLayout->addWidget(m_uninstallButton);
@@ -327,7 +321,7 @@ void PackageDetailsDialog::setupUi() {
m_closeButton->setMinimumWidth(100);
m_closeButton->setMinimumHeight(35);
- connect(m_closeButton, &QPushButton::clicked, this, &QDialog::accept);
+ connect(m_closeButton, &QPushButton::clicked, this, &QDialog::reject);
buttonLayout->addWidget(m_closeButton);
dialogLayout->addWidget(buttonWidget, 0);
@@ -337,45 +331,20 @@ void PackageDetailsDialog::setupUi() {
progressLayout->setContentsMargins(20, 0, 20, 20);
progressLayout->setSpacing(8);
- m_progressLabel->setStyleSheet("color: #a1a1aa; font-size: 12px;");
- m_progressLabel->setAlignment(Qt::AlignCenter);
+ m_progressLabel->setProperty("class", "detail-label");
+ m_progressLabel->setAlignment(Qt::AlignCenter);
progressLayout->addWidget(m_progressLabel);
m_progressBar->setMinimumHeight(20);
m_progressBar->setMaximumHeight(20);
m_progressBar->setTextVisible(true);
m_progressBar->setFormat("%p%");
- m_progressBar->setStyleSheet(
- "QProgressBar {"
- " border: none;"
- " border-radius: 4px;"
- " background-color: #27272a;"
- " color: #fafafa;"
- " text-align: center;"
- " font-size: 11px;"
- "}"
- "QProgressBar::chunk {"
- " border-radius: 4px;"
- " background-color: #3b82f6;"
- "}"
- );
- progressLayout->addWidget(m_progressBar);
+ m_progressBar->setObjectName("details-progress");
+ progressLayout->addWidget(m_progressBar);
// Toggle log button
- m_toggleLogButton->setStyleSheet(
- "QPushButton {"
- " background: none;"
- " border: none;"
- " color: #3b82f6;"
- " text-decoration: underline;"
- " font-size: 11px;"
- " padding: 4px;"
- "}"
- "QPushButton:hover {"
- " color: #60a5fa;"
- "}"
- );
- connect(m_toggleLogButton, &QPushButton::clicked, this, &PackageDetailsDialog::toggleLogViewer);
+ m_toggleLogButton->setProperty("class", "link-button");
+ connect(m_toggleLogButton, &QPushButton::clicked, this, &PackageDetailsDialog::toggleLogViewer);
progressLayout->addWidget(m_toggleLogButton, 0, Qt::AlignCenter);
m_progressWidget->hide();
@@ -388,18 +357,8 @@ void PackageDetailsDialog::setupUi() {
m_logViewer->setReadOnly(true);
m_logViewer->setMaximumHeight(200);
- m_logViewer->setStyleSheet(
- "QTextEdit {"
- " background-color: #18181b;"
- " border: 1px solid #27272a;"
- " border-radius: 6px;"
- " padding: 8px;"
- " font-family: monospace;"
- " font-size: 11px;"
- " color: #a1a1aa;"
- "}"
- );
- logLayout->addWidget(m_logViewer);
+ m_logViewer->setObjectName("log-viewer");
+ logLayout->addWidget(m_logViewer);
m_logWidget->hide();
dialogLayout->addWidget(m_logWidget, 0);
diff --git a/src/gui/search_widget.cpp b/src/gui/search_widget.cpp
index d4a7e20..667bc8b 100644
--- a/src/gui/search_widget.cpp
+++ b/src/gui/search_widget.cpp
@@ -25,6 +25,8 @@ SearchWidget::SearchWidget(QWidget* parent)
connect(m_aurHelper.get(), &AurHelper::searchCompleted,
this, &SearchWidget::onAurSearchCompleted);
+ connect(m_aurHelper.get(), &AurHelper::error,
+ this, &SearchWidget::onAurSearchError);
}
void SearchWidget::setupUi() {
@@ -32,10 +34,7 @@ void SearchWidget::setupUi() {
// Title
auto* titleLabel = new QLabel("Search Packages", this);
- auto titleFont = titleLabel->font();
- titleFont.setPointSize(24);
- titleFont.setBold(true);
- titleLabel->setFont(titleFont);
+ titleLabel->setObjectName("view-title");
mainLayout->addWidget(titleLabel);
// Search bar
@@ -59,6 +58,7 @@ void SearchWidget::setupUi() {
m_searchButton->setMinimumHeight(35);
m_searchButton->setMinimumWidth(100);
+ m_searchButton->setProperty("class", "primary-btn");
connect(m_searchButton, &QPushButton::clicked, this, &SearchWidget::onSearchClicked);
searchLayout->addWidget(m_searchButton);
@@ -90,6 +90,11 @@ void SearchWidget::onSearchClicked() {
return;
}
+ if (m_searchInProgress) {
+ return;
+ }
+
+ m_searchInProgress = true;
m_searchButton->setEnabled(false);
m_searchButton->setText("Searching...");
m_statusLabel->setText("Searching...");
@@ -121,6 +126,7 @@ void SearchWidget::onAurSearchCompleted(const QVector& results) {
m_searchButton->setEnabled(true);
m_searchButton->setText("Search");
+ m_searchInProgress = false;
if (m_allResults.isEmpty()) {
m_statusLabel->setText("No results found");
@@ -135,6 +141,19 @@ void SearchWidget::onAurSearchCompleted(const QVector& results) {
Logger::info(QString("Search completed: %1 results").arg(m_allResults.size()));
}
+void SearchWidget::onAurSearchError(const QString& errorMsg) {
+ Logger::warning(QString("AUR search failed: %1").arg(errorMsg));
+
+ m_searchButton->setEnabled(true);
+ m_searchButton->setText("Search");
+ m_searchInProgress = false;
+
+ if (m_allResults.isEmpty()) {
+ m_statusLabel->setText("No results found");
+ m_statusLabel->show();
+ }
+}
+
void SearchWidget::onFilterChanged(int index) {
QString filter = m_filterCombo->itemData(index).toString();
diff --git a/src/gui/search_widget.h b/src/gui/search_widget.h
index 5767dcf..ffa059b 100644
--- a/src/gui/search_widget.h
+++ b/src/gui/search_widget.h
@@ -51,10 +51,12 @@ public slots:
QVector m_currentResults;
QVector m_allResults;
+ bool m_searchInProgress = false;
private slots:
void onSearchClicked();
void onAurSearchCompleted(const QVector& results);
+ void onAurSearchError(const QString& errorMsg);
void onFilterChanged(int index);
void onPackageClicked(const PackageInfo& info);
};
diff --git a/src/gui/settings_widget.cpp b/src/gui/settings_widget.cpp
index 6d31e71..5199240 100644
--- a/src/gui/settings_widget.cpp
+++ b/src/gui/settings_widget.cpp
@@ -9,6 +9,7 @@
#include
#include
#include
+#include
#include
SettingsWidget::SettingsWidget(QWidget* parent)
@@ -40,10 +41,7 @@ void SettingsWidget::setupUi() {
// Title
auto* titleLabel = new QLabel("Settings", contentWidget);
- auto titleFont = titleLabel->font();
- titleFont.setPointSize(24);
- titleFont.setBold(true);
- titleLabel->setFont(titleFont);
+ titleLabel->setObjectName("view-title");
mainLayout->addWidget(titleLabel);
// Repository Settings
@@ -61,9 +59,9 @@ void SettingsWidget::setupUi() {
// Status label
m_statusLabel = new QLabel(contentWidget);
m_statusLabel->setAlignment(Qt::AlignCenter);
- m_statusLabel->setStyleSheet("QLabel { color: #0066cc; padding: 10px; }");
- m_statusLabel->hide();
- mainLayout->addWidget(m_statusLabel);
+ m_statusLabel->setProperty("class", "status-msg-info");
+ m_statusLabel->hide();
+ mainLayout->addWidget(m_statusLabel);
// Add stretch at the bottom
mainLayout->addStretch();
@@ -87,7 +85,7 @@ void SettingsWidget::createRepositorySettings() {
"Core and Extra repositories are required and cannot be disabled.",
this);
descLabel->setWordWrap(true);
- descLabel->setStyleSheet("QLabel { color: #666; margin-bottom: 10px; }");
+ descLabel->setProperty("class", "settings-description");
repoLayout->addWidget(descLabel);
// Core repository (always enabled, cannot be disabled)
@@ -129,7 +127,7 @@ void SettingsWidget::createRepositorySettings() {
"and may require administrator privileges.",
this);
infoLabel->setWordWrap(true);
- infoLabel->setStyleSheet("QLabel { color: #888; font-style: italic; margin-top: 10px; }");
+ infoLabel->setProperty("class", "settings-info-italic");
repoLayout->addWidget(infoLabel);
// Apply button
@@ -157,14 +155,14 @@ void SettingsWidget::createChaoticAurSettings() {
"Setup requires installing the keyring and mirrorlist packages.",
this);
descLabel->setWordWrap(true);
- descLabel->setStyleSheet("QLabel { color: #666; margin-bottom: 10px; }");
+ descLabel->setProperty("class", "settings-description");
chaoticLayout->addWidget(descLabel);
// Setup button section
auto* setupLayout = new QHBoxLayout();
auto* setupLabel = new QLabel("Install Chaotic-AUR:", this);
- setupLabel->setStyleSheet("QLabel { font-weight: bold; }");
+ setupLabel->setProperty("class", "settings-section-label");
setupLayout->addWidget(setupLabel);
setupLayout->addStretch();
@@ -184,8 +182,8 @@ void SettingsWidget::createChaoticAurSettings() {
"This will install chaotic-keyring and chaotic-mirrorlist from the official Chaotic-AUR repository.",
this);
setupInfoLabel->setWordWrap(true);
- setupInfoLabel->setStyleSheet("QLabel { color: #888; font-size: 11px; margin-top: 5px; margin-left: 10px; }");
- chaoticLayout->addWidget(setupInfoLabel);
+ setupInfoLabel->setProperty("class", "settings-help-text");
+ chaoticLayout->addWidget(setupInfoLabel);
// Spacer
chaoticLayout->addSpacing(10);
@@ -194,8 +192,8 @@ void SettingsWidget::createChaoticAurSettings() {
auto* removeLayout = new QHBoxLayout();
auto* removeLabel = new QLabel("Remove Chaotic-AUR:", this);
- removeLabel->setStyleSheet("QLabel { font-weight: bold; }");
- removeLayout->addWidget(removeLabel);
+ removeLabel->setProperty("class", "settings-section-label");
+ removeLayout->addWidget(removeLabel);
removeLayout->addStretch();
@@ -214,8 +212,8 @@ void SettingsWidget::createChaoticAurSettings() {
"This will remove the Chaotic-AUR packages. You need to uncheck the Chaotic-AUR option above or manually edit /etc/pacman.conf to remove the repository configuration.",
this);
removeInfoLabel->setWordWrap(true);
- removeInfoLabel->setStyleSheet("QLabel { color: #888; font-size: 11px; margin-top: 5px; margin-left: 10px; }");
- chaoticLayout->addWidget(removeInfoLabel);
+ removeInfoLabel->setProperty("class", "settings-help-text");
+ chaoticLayout->addWidget(removeInfoLabel);
m_chaoticAurGroup->setLayout(chaoticLayout);
}
@@ -229,7 +227,7 @@ void SettingsWidget::createMaintenanceSettings() {
"System maintenance and troubleshooting tools.",
this);
descLabel->setWordWrap(true);
- descLabel->setStyleSheet("QLabel { color: #666; margin-bottom: 10px; }");
+ descLabel->setProperty("class", "settings-description");
maintenanceLayout->addWidget(descLabel);
// Lock file section
@@ -238,8 +236,8 @@ void SettingsWidget::createMaintenanceSettings() {
auto* lockFileLabel = new QLabel(
"Pacman Database Lock:",
this);
- lockFileLabel->setStyleSheet("QLabel { font-weight: bold; }");
- lockFileLayout->addWidget(lockFileLabel);
+ lockFileLabel->setProperty("class", "settings-section-label");
+ lockFileLayout->addWidget(lockFileLabel);
lockFileLayout->addStretch();
@@ -259,7 +257,7 @@ void SettingsWidget::createMaintenanceSettings() {
"Remove it only if you're certain no package manager is currently running.",
this);
lockInfoLabel->setWordWrap(true);
- lockInfoLabel->setStyleSheet("QLabel { color: #888; font-size: 11px; margin-top: 5px; margin-left: 10px; }");
+ lockInfoLabel->setProperty("class", "settings-help-text");
maintenanceLayout->addWidget(lockInfoLabel);
// Spacer
@@ -271,7 +269,7 @@ void SettingsWidget::createMaintenanceSettings() {
auto* syncReposLabel = new QLabel(
"Synchronize Repositories:",
this);
- syncReposLabel->setStyleSheet("QLabel { font-weight: bold; }");
+ syncReposLabel->setProperty("class", "settings-section-label");
syncReposLayout->addWidget(syncReposLabel);
syncReposLayout->addStretch();
@@ -292,7 +290,7 @@ void SettingsWidget::createMaintenanceSettings() {
"or when you want to ensure you have the latest package information.",
this);
syncInfoLabel->setWordWrap(true);
- syncInfoLabel->setStyleSheet("QLabel { color: #888; font-size: 11px; margin-top: 5px; margin-left: 10px; }");
+ syncInfoLabel->setProperty("class", "settings-help-text");
maintenanceLayout->addWidget(syncInfoLabel);
// Spacer
@@ -302,17 +300,17 @@ void SettingsWidget::createMaintenanceSettings() {
auto* cancelProcessLayout = new QHBoxLayout();
auto* cancelProcessLabel = new QLabel(
- "Cancel Running Process:",
+ "Kill Running Process:",
this);
- cancelProcessLabel->setStyleSheet("QLabel { font-weight: bold; }");
+ cancelProcessLabel->setProperty("class", "settings-section-label");
cancelProcessLayout->addWidget(cancelProcessLabel);
cancelProcessLayout->addStretch();
- m_cancelProcessButton = new QPushButton("Cancel Process", this);
+ m_cancelProcessButton = new QPushButton("Kill Process", this);
m_cancelProcessButton->setMinimumWidth(150);
m_cancelProcessButton->setToolTip(
- "Cancel any running package operation (install, uninstall, update).\n"
+ "Kill any running package operation (install, uninstall, update).\n"
"Use this if an operation is stuck or taking too long.\n"
"This is different from removing the lock file - it actually stops the running process.");
connect(m_cancelProcessButton, &QPushButton::clicked, this, &SettingsWidget::onCancelProcessClicked);
@@ -322,11 +320,11 @@ void SettingsWidget::createMaintenanceSettings() {
// Cancel process info
auto* cancelInfoLabel = new QLabel(
- "Use this to cancel a stuck installation, uninstallation, or update process.\n"
+ "Use this to kill process which is stuck at installation, uninstallation, or update.\n"
"This is useful when you see 'Another operation is already in progress' and want to stop it.",
this);
cancelInfoLabel->setWordWrap(true);
- cancelInfoLabel->setStyleSheet("QLabel { color: #888; font-size: 11px; margin-top: 5px; margin-left: 10px; }");
+ cancelInfoLabel->setProperty("class", "settings-help-text");
maintenanceLayout->addWidget(cancelInfoLabel);
m_maintenanceGroup->setLayout(maintenanceLayout);
@@ -809,8 +807,10 @@ void SettingsWidget::onApplyClicked() {
// Show results and offer database sync if changes were applied
if (changesApplied && success) {
m_statusLabel->setText("Settings applied successfully! Please sync package databases.");
- m_statusLabel->setStyleSheet("QLabel { color: #00aa00; padding: 10px; font-weight: bold; }");
- m_statusLabel->show();
+ m_statusLabel->setProperty("class", "status-msg-success");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
+ m_statusLabel->show();
m_applyButton->setEnabled(false);
@@ -828,22 +828,25 @@ void SettingsWidget::onApplyClicked() {
if (process.exitCode() == 0) {
m_statusLabel->setText("Package databases synced successfully!");
- Logger::info("Package databases synced after repository change");
+ m_statusLabel->setProperty("class", "status-msg-success");
+ Logger::info("Package databases synced after repository change");
// Refresh ALPM databases to pick up the new repository
AlpmWrapper::instance().refreshDatabases();
} else {
m_statusLabel->setText("Failed to sync package databases. Please run 'sudo pacman -Sy' manually.");
- m_statusLabel->setStyleSheet("QLabel { color: #aa0000; padding: 10px; }");
- }
+ m_statusLabel->setProperty("class", "status-msg-error");
+ }
} else {
// Even if they don't sync now, refresh ALPM to detect the new repo configuration
AlpmWrapper::instance().refreshDatabases();
}
} else if (!success) {
m_statusLabel->setText("Failed to apply settings. Please check permissions.");
- m_statusLabel->setStyleSheet("QLabel { color: #aa0000; padding: 10px; }");
- m_statusLabel->show();
+ m_statusLabel->setProperty("class", "status-msg-error");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
+ m_statusLabel->show();
}
}
@@ -900,7 +903,9 @@ void SettingsWidget::onRemoveLockClicked() {
if (process.exitCode() == 0) {
m_statusLabel->setText("Lock file removed successfully!");
- m_statusLabel->setStyleSheet("QLabel { color: #00aa00; padding: 10px; font-weight: bold; }");
+ m_statusLabel->setProperty("class", "status-msg-success");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
Logger::info("Pacman lock file removed successfully");
@@ -909,7 +914,9 @@ void SettingsWidget::onRemoveLockClicked() {
"You can now run package operations.");
} else {
m_statusLabel->setText("Failed to remove lock file. Check permissions.");
- m_statusLabel->setStyleSheet("QLabel { color: #aa0000; padding: 10px; }");
+ m_statusLabel->setProperty("class", "status-msg-error");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
Logger::error("Failed to remove pacman lock file");
@@ -942,7 +949,9 @@ void SettingsWidget::onSetupChaoticClicked() {
}
m_statusLabel->setText("Setting up Chaotic-AUR repository...");
- m_statusLabel->setStyleSheet("QLabel { color: #0066cc; padding: 10px; }");
+ m_statusLabel->setProperty("class", "status-msg-info");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
m_setupChaoticButton->setEnabled(false);
@@ -977,9 +986,11 @@ void SettingsWidget::onSetupChaoticClicked() {
if (exitCode == 0 && exitStatus == QProcess::NormalExit) {
m_statusLabel->setText("Chaotic-AUR packages installed successfully!");
- m_statusLabel->setStyleSheet("QLabel { color: #00aa00; padding: 10px; font-weight: bold; }");
+ m_statusLabel->setProperty("class", "status-msg-success");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
- Logger::info("Chaotic-AUR packages installed successfully");
+ Logger::info("Chaotic-AUR packages installed successfully");
// Refresh the chaotic-aur checkbox status
loadCurrentSettings();
@@ -990,7 +1001,9 @@ void SettingsWidget::onSetupChaoticClicked() {
"After enabling, remember to sync the package databases.");
} else {
m_statusLabel->setText("Failed to install Chaotic-AUR packages.");
- m_statusLabel->setStyleSheet("QLabel { color: #aa0000; padding: 10px; }");
+ m_statusLabel->setProperty("class", "status-msg-error");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
Logger::error(QString("Failed to install Chaotic-AUR packages. Exit code: %1").arg(exitCode));
@@ -1032,10 +1045,12 @@ void SettingsWidget::onRemoveChaoticClicked() {
}
m_statusLabel->setText("Removing Chaotic-AUR packages...");
- m_statusLabel->setStyleSheet("QLabel { color: #0066cc; padding: 10px; }");
+ m_statusLabel->setProperty("class", "status-msg-info");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
- m_removeChaoticButton->setEnabled(false);
-
+ m_removeChaoticButton->setEnabled(false);
+
// Remove chaotic-keyring and chaotic-mirrorlist
QProcess* process = new QProcess(this);
connect(process, QOverload::of(&QProcess::finished),
@@ -1045,7 +1060,9 @@ void SettingsWidget::onRemoveChaoticClicked() {
if (exitCode == 0 && exitStatus == QProcess::NormalExit) {
m_statusLabel->setText("Chaotic-AUR packages removed successfully!");
- m_statusLabel->setStyleSheet("QLabel { color: #00aa00; padding: 10px; font-weight: bold; }");
+ m_statusLabel->setProperty("class", "status-msg-success");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
Logger::info("Chaotic-AUR packages removed successfully");
@@ -1058,7 +1075,9 @@ void SettingsWidget::onRemoveChaoticClicked() {
"the [chaotic-aur] section in /etc/pacman.conf");
} else {
m_statusLabel->setText("Failed to remove Chaotic-AUR packages.");
- m_statusLabel->setStyleSheet("QLabel { color: #aa0000; padding: 10px; }");
+ m_statusLabel->setProperty("class", "status-msg-error");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
Logger::error("Failed to remove Chaotic-AUR packages");
@@ -1088,12 +1107,14 @@ void SettingsWidget::onSyncReposClicked() {
if (msgBox.exec() != QMessageBox::Yes) {
return;
}
-
+
m_statusLabel->setText("Synchronizing repositories...");
- m_statusLabel->setStyleSheet("QLabel { color: #0066cc; padding: 10px; }");
+ m_statusLabel->setProperty("class", "status-msg-info");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
- m_syncReposButton->setEnabled(false);
-
+ m_syncReposButton->setEnabled(false);
+
// Run pacman -Sy with pkexec
QProcess* process = new QProcess(this);
connect(process, QOverload::of(&QProcess::finished),
@@ -1103,7 +1124,9 @@ void SettingsWidget::onSyncReposClicked() {
if (exitCode == 0 && exitStatus == QProcess::NormalExit) {
m_statusLabel->setText("Repositories synchronized successfully!");
- m_statusLabel->setStyleSheet("QLabel { color: #00aa00; padding: 10px; font-weight: bold; }");
+ m_statusLabel->setProperty("class", "status-msg-success");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
Logger::info("Repositories synchronized successfully");
@@ -1115,7 +1138,9 @@ void SettingsWidget::onSyncReposClicked() {
"The package list has been updated with the latest available packages.");
} else {
m_statusLabel->setText("Failed to synchronize repositories.");
- m_statusLabel->setStyleSheet("QLabel { color: #aa0000; padding: 10px; }");
+ m_statusLabel->setProperty("class", "status-msg-error");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
Logger::error("Failed to synchronize repositories");
@@ -1133,20 +1158,20 @@ void SettingsWidget::onCancelProcessClicked() {
if (!PackageManager::instance().isOperationRunning()) {
QMessageBox::information(this, "No Process Running",
"There is no package operation currently running.\n"
- "Nothing to cancel.");
+ "Nothing to kill.");
return;
}
// Show confirmation dialog
QMessageBox msgBox(this);
msgBox.setIcon(QMessageBox::Warning);
- msgBox.setWindowTitle("Cancel Running Process");
- msgBox.setText("Are you sure you want to cancel the running package operation?");
+ msgBox.setWindowTitle("Kill Running Process");
+ msgBox.setText("Are you sure you want to kill the running package operation?");
msgBox.setInformativeText(
"This will stop the current installation, uninstallation, or update process.\n\n"
- "WARNING: Cancelling a package operation may leave your system in an inconsistent state.\n"
+ "WARNING: Killing a package operation may leave your system in an inconsistent state.\n"
"You may need to run the operation again to complete it properly.\n\n"
- "It's recommended to only cancel if the process is truly stuck or unresponsive.");
+ "It's recommended to only kill operation if the process is truly stuck or unresponsive.");
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
@@ -1154,21 +1179,25 @@ void SettingsWidget::onCancelProcessClicked() {
return;
}
- m_statusLabel->setText("Cancelling running process...");
- m_statusLabel->setStyleSheet("QLabel { color: #0066cc; padding: 10px; }");
- m_statusLabel->show();
-
+ m_statusLabel->setText("Killing running process...");
+ m_statusLabel->setProperty("class", "status-msg-info");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
+ m_statusLabel->show();
+
// Cancel the operation
PackageManager::instance().cancelRunningOperation();
- m_statusLabel->setText("Process cancelled successfully!");
- m_statusLabel->setStyleSheet("QLabel { color: #00aa00; padding: 10px; font-weight: bold; }");
+ m_statusLabel->setText("Process killed successfully!");
+ m_statusLabel->setProperty("class", "status-msg-success");
+ m_statusLabel->style()->unpolish(m_statusLabel);
+ m_statusLabel->style()->polish(m_statusLabel);
m_statusLabel->show();
+
+ Logger::info("User killed running package operation from settings");
- Logger::info("User cancelled running package operation from settings");
-
- QMessageBox::information(this, "Process Cancelled",
- "The running package operation has been cancelled.\n\n"
+ QMessageBox::information(this, "Process Killed",
+ "The running package operation has been killed.\n\n"
"If you were in the middle of installing or updating a package, "
"you may need to run the operation again to complete it.");
}
diff --git a/src/gui/updates_widget.cpp b/src/gui/updates_widget.cpp
index f191a46..0afc1ca 100644
--- a/src/gui/updates_widget.cpp
+++ b/src/gui/updates_widget.cpp
@@ -8,6 +8,7 @@
#include
#include
#include
+#include
class UpdateItem : public QWidget {
Q_OBJECT
@@ -15,7 +16,10 @@ class UpdateItem : public QWidget {
public:
UpdateItem(const UpdateInfo& info, QWidget* parent = nullptr)
: QWidget(parent), m_info(info) {
-
+
+ // Required for the app-wide stylesheet to paint this custom widget's background
+ setAttribute(Qt::WA_StyledBackground, true);
+
auto* layout = new QHBoxLayout(this);
layout->setContentsMargins(10, 10, 10, 10);
@@ -30,20 +34,20 @@ class UpdateItem : public QWidget {
auto* versionLabel = new QLabel(
QString("%1 → %2").arg(m_info.oldVersion, m_info.newVersion), this);
- versionLabel->setStyleSheet("color: #888;");
- infoLayout->addWidget(versionLabel);
+ versionLabel->setProperty("class", "secondary-text");
+ infoLayout->addWidget(versionLabel);
auto* repoLabel = new QLabel(m_info.repository, this);
- repoLabel->setStyleSheet("color: #666; font-size: 10px;");
- infoLayout->addWidget(repoLabel);
+ repoLabel->setProperty("class", "dim-text");
+ infoLayout->addWidget(repoLabel);
layout->addLayout(infoLayout);
layout->addStretch();
if (m_info.downloadSize > 0) {
auto* sizeLabel = new QLabel(formatSize(m_info.downloadSize), this);
- sizeLabel->setStyleSheet("color: #888;");
- layout->addWidget(sizeLabel);
+ sizeLabel->setProperty("class", "secondary-text");
+ layout->addWidget(sizeLabel);
}
auto* updateButton = new QPushButton("Update", this);
@@ -116,16 +120,13 @@ void UpdatesWidget::setupUi() {
auto* headerLayout = new QHBoxLayout();
auto* titleLabel = new QLabel("Available Updates", this);
- auto titleFont = titleLabel->font();
- titleFont.setPointSize(24);
- titleFont.setBold(true);
- titleLabel->setFont(titleFont);
+ titleLabel->setObjectName("view-title");
headerLayout->addWidget(titleLabel);
headerLayout->addStretch();
- m_countLabel->setStyleSheet("font-size: 14px; color: #888;");
- headerLayout->addWidget(m_countLabel);
+ m_countLabel->setProperty("class", "secondary-text");
+ headerLayout->addWidget(m_countLabel);
m_checkButton->setMinimumHeight(35);
connect(m_checkButton, &QPushButton::clicked, this, &UpdatesWidget::checkForUpdates);
@@ -133,6 +134,7 @@ void UpdatesWidget::setupUi() {
m_updateAllButton->setMinimumHeight(35);
m_updateAllButton->setMinimumWidth(120);
+ m_updateAllButton->setProperty("class", "primary-btn");
m_updateAllButton->setEnabled(false);
connect(m_updateAllButton, &QPushButton::clicked, this, &UpdatesWidget::onUpdateAll);
headerLayout->addWidget(m_updateAllButton);
@@ -165,48 +167,23 @@ void UpdatesWidget::setupUi() {
// Progress bar section (hidden by default)
auto* progressLayout = new QVBoxLayout(m_progressWidget);
- progressLayout->setContentsMargins(20, 0, 20, 20);
+ progressLayout->setContentsMargins(20, 0, 20, 20);
progressLayout->setSpacing(8);
- m_progressLabel->setStyleSheet("color: #a1a1aa; font-size: 12px;");
- m_progressLabel->setAlignment(Qt::AlignCenter);
+ m_progressLabel->setProperty("class", "dim-text");
+ m_progressLabel->setAlignment(Qt::AlignCenter);
progressLayout->addWidget(m_progressLabel);
m_progressBar->setMinimumHeight(20);
m_progressBar->setMaximumHeight(20);
m_progressBar->setTextVisible(true);
m_progressBar->setFormat("%p%");
- m_progressBar->setStyleSheet(
- "QProgressBar {"
- " border: none;"
- " border-radius: 4px;"
- " background-color: #27272a;"
- " color: #fafafa;"
- " text-align: center;"
- " font-size: 11px;"
- "}"
- "QProgressBar::chunk {"
- " border-radius: 4px;"
- " background-color: #3b82f6;"
- "}"
- );
- progressLayout->addWidget(m_progressBar);
+ m_progressBar->setObjectName("operation-progress");
+ progressLayout->addWidget(m_progressBar);
// Toggle log button
- m_toggleLogButton->setStyleSheet(
- "QPushButton {"
- " background: none;"
- " border: none;"
- " color: #3b82f6;"
- " text-decoration: underline;"
- " font-size: 11px;"
- " padding: 4px;"
- "}"
- "QPushButton:hover {"
- " color: #60a5fa;"
- "}"
- );
- connect(m_toggleLogButton, &QPushButton::clicked, this, &UpdatesWidget::toggleLogViewer);
+ m_toggleLogButton->setProperty("class", "link-button");
+ connect(m_toggleLogButton, &QPushButton::clicked, this, &UpdatesWidget::toggleLogViewer);
progressLayout->addWidget(m_toggleLogButton, 0, Qt::AlignCenter);
m_progressWidget->hide();
@@ -219,17 +196,7 @@ void UpdatesWidget::setupUi() {
m_logViewer->setReadOnly(true);
m_logViewer->setMaximumHeight(200);
- m_logViewer->setStyleSheet(
- "QTextEdit {"
- " background-color: #18181b;"
- " border: 1px solid #27272a;"
- " border-radius: 6px;"
- " color: #d4d4d8;"
- " font-family: 'Consolas', 'Monaco', monospace;"
- " font-size: 11px;"
- " padding: 8px;"
- "}"
- );
+ m_logViewer->setObjectName("log-viewer");
logLayout->addWidget(m_logViewer);
m_logWidget->hide();
@@ -440,6 +407,9 @@ void UpdatesWidget::onOperationOutput(const QString& output) {
}
void UpdatesWidget::onOperationCompleted(bool success, const QString& message) {
+ Q_UNUSED(success);
+ Q_UNUSED(message);
+
// Refresh ALPM state so subsequent queries reflect the changes
AlpmWrapper::instance().release();
AlpmWrapper::instance().initialize();
@@ -457,16 +427,11 @@ void UpdatesWidget::onOperationCompleted(bool success, const QString& message) {
}
}
}
-
- if (success) {
- QMessageBox::information(this, "Success", message);
- checkForUpdates();
- } else {
- QMessageBox::warning(this, "Operation Failed", message);
- }
}
void UpdatesWidget::onOperationError(const QString& error) {
+ Q_UNUSED(error);
+
// Refresh ALPM state (best-effort)
AlpmWrapper::instance().release();
AlpmWrapper::instance().initialize();
@@ -484,8 +449,6 @@ void UpdatesWidget::onOperationError(const QString& error) {
}
}
}
-
- QMessageBox::critical(this, "Error", error);
}
#include "updates_widget.moc"
diff --git a/stylesheet.qss b/stylesheet.qss
deleted file mode 100644
index 2ec70f9..0000000
--- a/stylesheet.qss
+++ /dev/null
@@ -1,338 +0,0 @@
-/* ALG App Store - Qt Stylesheet */
-/* Based on the original Tailwind CSS dark theme */
-
-* {
- font-family: "Geist Sans", "Segoe UI", Roboto, Arial, sans-serif;
-}
-
-QMainWindow {
- background-color: #09090b;
- color: #fafafa;
-}
-
-QWidget {
- background-color: #09090b;
- color: #fafafa;
-}
-
-/* Tab Widget */
-QTabWidget::pane {
- border: 1px solid #27272a;
- background-color: #09090b;
-}
-
-QTabBar::tab {
- background-color: #18181b;
- color: #a1a1aa;
- padding: 10px 20px;
- margin-right: 2px;
- border: 1px solid #27272a;
- border-bottom: none;
- min-width: 100px;
-}
-
-QTabBar::tab:selected {
- background-color: #27272a;
- color: #fafafa;
-}
-
-QTabBar::tab:hover {
- background-color: #27272a;
-}
-
-/* Buttons */
-QPushButton {
- background-color: #fafafa;
- color: #18181b;
- border: none;
- border-radius: 6px;
- padding: 8px 16px;
- font-weight: 500;
-}
-
-QPushButton:hover {
- background-color: #e4e4e7;
-}
-
-QPushButton:pressed {
- background-color: #d4d4d8;
-}
-
-QPushButton:disabled {
- background-color: #3f3f46;
- color: #71717a;
-}
-
-/* Line Edit / Input */
-QLineEdit {
- background-color: #18181b;
- color: #fafafa;
- border: 1px solid #27272a;
- border-radius: 6px;
- padding: 8px 12px;
- selection-background-color: #3f3f46;
-}
-
-QLineEdit:focus {
- border: 1px solid #52525b;
-}
-
-QLineEdit::placeholder {
- color: #71717a;
-}
-
-/* Combo Box */
-QComboBox {
- background-color: #18181b;
- color: #fafafa;
- border: 1px solid #27272a;
- border-radius: 6px;
- padding: 8px 12px;
- min-width: 120px;
-}
-
-QComboBox:hover {
- border: 1px solid #3f3f46;
-}
-
-QComboBox::drop-down {
- border: none;
- width: 20px;
-}
-
-QComboBox::down-arrow {
- width: 10px;
- height: 10px;
-}
-
-QComboBox QAbstractItemView {
- background-color: #18181b;
- color: #fafafa;
- border: 1px solid #27272a;
- selection-background-color: #27272a;
-}
-
-/* Scroll Area */
-QScrollArea {
- border: none;
- background-color: transparent;
-}
-
-/* Scroll Bar */
-QScrollBar:vertical {
- background-color: #18181b;
- width: 12px;
- margin: 0px;
-}
-
-QScrollBar::handle:vertical {
- background-color: #3f3f46;
- border-radius: 6px;
- min-height: 30px;
-}
-
-QScrollBar::handle:vertical:hover {
- background-color: #52525b;
-}
-
-QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
- height: 0px;
-}
-
-QScrollBar:horizontal {
- background-color: #18181b;
- height: 12px;
- margin: 0px;
-}
-
-QScrollBar::handle:horizontal {
- background-color: #3f3f46;
- border-radius: 6px;
- min-width: 30px;
-}
-
-QScrollBar::handle:horizontal:hover {
- background-color: #52525b;
-}
-
-QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
- width: 0px;
-}
-
-/* Package Card */
-QWidget[class="package-card"] {
- background-color: #18181b;
- border: 1px solid #27272a;
- border-radius: 8px;
-}
-
-QWidget[class="package-card"][hovered="true"] {
- background-color: #27272a;
- border: 1px solid #3f3f46;
-}
-
-/* Labels / Badges */
-QLabel[class="status-badge"] {
- background-color: #27272a;
- color: #fafafa;
- border-radius: 4px;
- padding: 4px 8px;
- font-size: 11px;
-}
-
-QLabel[class="repo-badge"] {
- background-color: #27272a;
- color: #a1a1aa;
- border-radius: 4px;
- padding: 4px 8px;
- font-size: 11px;
-}
-
-/* Update Item */
-QWidget[class="update-item"] {
- background-color: #18181b;
- border: 1px solid #27272a;
- border-radius: 6px;
- margin: 2px 0px;
-}
-
-/* Group Box */
-QGroupBox {
- background-color: #18181b;
- border: 1px solid #27272a;
- border-radius: 8px;
- margin-top: 10px;
- padding-top: 10px;
- font-weight: bold;
-}
-
-QGroupBox::title {
- subcontrol-origin: margin;
- subcontrol-position: top left;
- padding: 0px 10px;
- color: #fafafa;
-}
-
-/* Text Edit */
-QTextEdit {
- background-color: #18181b;
- color: #fafafa;
- border: 1px solid #27272a;
- border-radius: 6px;
- padding: 8px;
- selection-background-color: #3f3f46;
-}
-
-QTextEdit:focus {
- border: 1px solid #52525b;
-}
-
-/* Dialog */
-QDialog {
- background-color: #09090b;
- color: #fafafa;
-}
-
-/* Menu Bar */
-QMenuBar {
- background-color: #18181b;
- color: #fafafa;
- border-bottom: 1px solid #27272a;
-}
-
-QMenuBar::item {
- padding: 5px 10px;
- background-color: transparent;
-}
-
-QMenuBar::item:selected {
- background-color: #27272a;
-}
-
-QMenuBar::item:pressed {
- background-color: #3f3f46;
-}
-
-/* Menu */
-QMenu {
- background-color: #18181b;
- color: #fafafa;
- border: 1px solid #27272a;
- border-radius: 6px;
- padding: 5px;
-}
-
-QMenu::item {
- padding: 8px 25px;
- border-radius: 4px;
-}
-
-QMenu::item:selected {
- background-color: #27272a;
-}
-
-QMenu::separator {
- height: 1px;
- background-color: #27272a;
- margin: 5px 0px;
-}
-
-/* Message Box */
-QMessageBox {
- background-color: #18181b;
- color: #fafafa;
-}
-
-QMessageBox QLabel {
- color: #fafafa;
-}
-
-QMessageBox QPushButton {
- min-width: 80px;
- background-color: #3b82f6;
- color: #fafafa;
- border: none;
- border-radius: 6px;
- padding: 8px 16px;
- font-weight: 500;
-}
-
-QMessageBox QPushButton:hover {
- background-color: #2563eb;
-}
-
-QMessageBox QPushButton:pressed {
- background-color: #1d4ed8;
-}
-
-QMessageBox QPushButton:default {
- background-color: #3b82f6;
- color: #fafafa;
-}
-
-QMessageBox QPushButton:default:hover {
- background-color: #2563eb;
-}
-
-QMessageBox QPushButton:!default {
- background-color: #27272a;
- color: #fafafa;
-}
-
-QMessageBox QPushButton:!default:hover {
- background-color: #3f3f46;
-}
-
-/* Progress Bar (if needed in future) */
-QProgressBar {
- background-color: #27272a;
- border: 1px solid #3f3f46;
- border-radius: 4px;
- text-align: center;
- color: #fafafa;
-}
-
-QProgressBar::chunk {
- background-color: #3b82f6;
- border-radius: 4px;
-}