diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..3b889d8
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,25 @@
+name: Build ALG Welcome - Test Build
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container: archlinux:latest
+
+ steps:
+ - name: Install dependencies
+ run: pacman -Syu --noconfirm base-devel cmake qt6-base git
+
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Configure
+ run: cmake -B build -DCMAKE_BUILD_TYPE=Release
+
+ - name: Build
+ run: cmake --build build -j$(nproc)
diff --git a/assets/switch_off.svg b/assets/switch_off.svg
new file mode 100644
index 0000000..889830f
--- /dev/null
+++ b/assets/switch_off.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/switch_on.svg b/assets/switch_on.svg
new file mode 100644
index 0000000..35a81bc
--- /dev/null
+++ b/assets/switch_on.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/WelcomeWindow.cpp b/src/WelcomeWindow.cpp
index e32ac93..e1330c3 100644
--- a/src/WelcomeWindow.cpp
+++ b/src/WelcomeWindow.cpp
@@ -27,13 +27,20 @@ WelcomeWindow::WelcomeWindow(QWidget *parent)
: QMainWindow(parent)
, calamaresTimer(std::make_unique())
{
+ // Setup search paths for assets
+ QDir::setSearchPaths("assets", {
+ "/usr/share/alg-welcome/assets",
+ QDir::currentPath() + "/assets",
+ QDir::currentPath() + "/../assets" // Support running from build directory
+ });
+
// Get system information
desktopEnv = Extras::getDesktopEnvironment();
isLiveISO = Extras::checkIfLiveISO();
// Setup UI
setupWindow();
- // applyStylesheet();
+ applyStylesheet();
setupUI();
// Setup Calamares monitoring
@@ -250,7 +257,17 @@ QPushButton* WelcomeWindow::createButtonWithIcon(const QString &label,
// Set icon
if (fromFile) {
- const QString iconPath = QDir::currentPath() + "/" + iconName;
+ // Use search path prefix if iconName doesn't already have it
+ QString iconPath = iconName;
+ if (!iconPath.startsWith("assets:")) {
+ // Strip leading 'assets/' if present since we use the 'assets:' search path
+ if (iconPath.startsWith("assets/")) {
+ iconPath = "assets:" + iconPath.mid(7);
+ } else {
+ iconPath = "assets:" + iconPath;
+ }
+ }
+
if (QFile::exists(iconPath)) {
button->setIcon(QIcon(iconPath));
button->setIconSize(QSize(ICON_SIZE, ICON_SIZE));
diff --git a/src/main.cpp b/src/main.cpp
index 73ba855..3471c1a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,5 +1,6 @@
#include "WelcomeWindow.h"
#include "version.h"
+#include "utils/Autostart.h"
#include
#include
#include
@@ -39,6 +40,10 @@ int main(int argc, char *argv[]) {
qDebug() << "ALG Welcome version:" << ALG_WELCOME_VERSION;
}
+ // Always ensure autostart is enabled so the welcome app
+ // displays on boot (important for the live ISO)
+ Autostart::toggleAutostart(true);
+
WelcomeWindow window;
window.show();
diff --git a/styles.qss b/styles.qss
index 23a1599..7243944 100644
--- a/styles.qss
+++ b/styles.qss
@@ -50,24 +50,18 @@ QCheckBox {
}
QCheckBox::indicator {
- width: 42px;
- height: 22px;
- border-radius: 11px;
- background-color: #d0d0d0;
- border: none;
+ width: 48px;
+ height: 24px;
}
-QCheckBox::indicator:hover {
- background-color: #c0c0c0;
+QCheckBox::indicator:unchecked {
+ image: url(assets:switch_off.svg);
}
QCheckBox::indicator:checked {
- background-color: #4a86e8;
+ image: url(assets:switch_on.svg);
}
-QCheckBox::indicator:checked:hover {
- background-color: #3a76d8;
-}
/* Frame
QFrame {