From 1b7278ec72b7c48c45fa626dceb20cabeb199441 Mon Sep 17 00:00:00 2001 From: Akash6222 Date: Mon, 19 Jan 2026 01:25:31 +0530 Subject: [PATCH 1/5] Added toggle switch --- assets/switch_off.svg | 4 ++++ assets/switch_on.svg | 4 ++++ src/WelcomeWindow.cpp | 2 +- styles.qss | 16 +++++----------- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 assets/switch_off.svg create mode 100644 assets/switch_on.svg 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..5a941d1 100644 --- a/src/WelcomeWindow.cpp +++ b/src/WelcomeWindow.cpp @@ -33,7 +33,7 @@ WelcomeWindow::WelcomeWindow(QWidget *parent) // Setup UI setupWindow(); - // applyStylesheet(); + applyStylesheet(); setupUI(); // Setup Calamares monitoring diff --git a/styles.qss b/styles.qss index 23a1599..810b23b 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 { From 094e6dc9fb83a6e70a4e96df5b282ed6506c34b5 Mon Sep 17 00:00:00 2001 From: Akash6222 Date: Mon, 19 Jan 2026 01:35:17 +0530 Subject: [PATCH 2/5] svgs were loaded properly in app , now it's fixed --- src/WelcomeWindow.cpp | 19 ++++++++++++++++++- styles.qss | 4 ++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/WelcomeWindow.cpp b/src/WelcomeWindow.cpp index 5a941d1..e1330c3 100644 --- a/src/WelcomeWindow.cpp +++ b/src/WelcomeWindow.cpp @@ -27,6 +27,13 @@ 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(); @@ -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/styles.qss b/styles.qss index 810b23b..7243944 100644 --- a/styles.qss +++ b/styles.qss @@ -55,11 +55,11 @@ QCheckBox::indicator { } QCheckBox::indicator:unchecked { - image: url(assets/switch_off.svg); + image: url(assets:switch_off.svg); } QCheckBox::indicator:checked { - image: url(assets/switch_on.svg); + image: url(assets:switch_on.svg); } From c48688d5eabbea0fbeaf074f5c392b6724b4b596 Mon Sep 17 00:00:00 2001 From: demonkillerr Date: Tue, 10 Feb 2026 20:15:32 +0000 Subject: [PATCH 3/5] make sure autostart is always on --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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(); From 05e9f9517f36ab6b16bb52199b33755112dd4775 Mon Sep 17 00:00:00 2001 From: demonkillerr Date: Tue, 10 Feb 2026 20:19:12 +0000 Subject: [PATCH 4/5] ci: build on PRs and pushes to main --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f9ced15 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: 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) From 1b22461b5d1caf06bf08c48edea85c14b5bf151c Mon Sep 17 00:00:00 2001 From: demonkillerr Date: Tue, 10 Feb 2026 20:19:55 +0000 Subject: [PATCH 5/5] ci: change ci name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9ced15..3b889d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Build ALG Welcome - Test Build on: push: