Functionality and UI overhaul #1

Merged
tsimonq2 merged 5 commits from arraybolt3/work into master 1 year ago

@ -32,5 +32,7 @@ qt_finalize_executable(lubuntu-installer-prompt)
install(TARGETS lubuntu-installer-prompt DESTINATION bin)
install(PROGRAMS "scripts/lubuntu-installer" DESTINATION libexec)
install(PROGRAMS "scripts/start-lubuntu-live-env" DESTINATION bin)
install(FILES "img/background.png" DESTINATION share/lubuntu/installer-prompt)
install(FILES "lubuntu-installer-prompt.desktop" DESTINATION /etc/xdg/xdg-Lubuntu/autostart)
install(FILES "lubuntu-live-environment.desktop" DESTINATION share/xsessions)
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink /etc/xdg/xdg-Lubuntu /etc/xdg/xdg-lubuntu-live-environment)")

@ -7,3 +7,20 @@ Releases are signed with Simon Quigley's GPG key: 5C7ABEA20F8630459CC8C8B5E27F2C
Licensing info:
- Everything is GPL-3 by 2022 Lubuntu Developers <lubuntu-devel@lists.ubuntu.com> unless stated otherwise.
- img/background.png is licensed CC-BY-4.0, authored by Aaron Rainbolt <arraybolt3@gmail.com>, copyright ownership the same as source
## Architecture
This section serves to explain how lubuntu-installer-prompt's various components work together to provide the Lubuntu ISO boot experience.
1. SDDM loads.
2. /etc/sddm.conf is read. This file has been generated (or modified?) by Casper to point to a lubuntu-live-environment.desktop X session.
3. lubuntu-live-environment.desktop executes /bin/start-lubuntu-live-env.
4. start-lubuntu-live-env starts Openbox and backgrounds it.
5. start-lubuntu-live-env starts /bin/lubuntu-installer-prompt but does not background it.
6. The installer prompt appears.
7. The user clicks "Install Lubuntu" or "Try Lubuntu".
8. If "Install Lubuntu" is clicked, the installer prompt executes /usr/libexec/lubuntu-installer.sh, which then executes Calamares. The installer prompt then removes the buttons from the screen.
9. The installer window appears on the user's screen.
10. If Calamares closes, the installer prompt detects this and exits.
11. When the installer prompt exits, start-lubuntu-live-env kills Openbox, then runs startlxqt.
12. If "Try Lubuntu" is clicked, steps 10 and 11 are executed immediately.

@ -1,6 +0,0 @@
[Desktop Entry]
Exec=/usr/bin/lubuntu-installer-prompt
Name=Lubuntu Installer Prompt
Type=Application
Version=0.3.0
X-LXQt-Need-Tray=true

@ -0,0 +1,5 @@
[Desktop Entry]
Exec=/bin/start-lubuntu-live-env
Name=Lubuntu Live Environment
Comment=Starts the Lubuntu Live Environment
Type=Application

@ -0,0 +1,8 @@
#!/bin/bash
# Starts the Lubuntu Live Environment.
openbox &
lubuntu-installer-prompt # This is intentionally *not* backgrounded.
# If it exits...
killall openbox
startlxqt

@ -25,12 +25,9 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
// Resize the layout widget to the screen size.
ui->gridLayoutWidget->resize(width, height);
// Set the button colors
QString css = "background-color: rgba(0, 104, 200, 100); color: white; border-radius: 15px;";
// Set the buttons to be translucent
ui->tryLubuntu->setAttribute(Qt::WA_TranslucentBackground);
ui->tryLubuntu->setStyleSheet(css);
ui->installLubuntu->setAttribute(Qt::WA_TranslucentBackground);
ui->installLubuntu->setStyleSheet(css);
// Slots and signals
connect(ui->tryLubuntu, &QAbstractButton::clicked, this, &InstallerPrompt::tryLubuntu);
@ -44,8 +41,13 @@ void InstallerPrompt::tryLubuntu()
void InstallerPrompt::installLubuntu()
{
ui->tryLubuntu->setVisible(false);
ui->installLubuntu->setVisible(false);
QProcess *calamares = new QProcess(this);
calamares->start("/usr/libexec/lubuntu-installer");
// If Calamares exits, it either crashed or the user cancelled the installation. Exit the installer prompt (and start LXQt).
connect(calamares, &QProcess::finished, this, &InstallerPrompt::tryLubuntu);
}
InstallerPrompt::~InstallerPrompt()

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>680</width>
<height>420</height>
<width>2085</width>
<height>1303</height>
</rect>
</property>
<property name="minimumSize">
@ -36,11 +36,24 @@
</rect>
</property>
<layout class="QVBoxLayout" name="mainLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<item>
<layout class="QHBoxLayout" name="titleLayout" stretch="1,0,1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="titleLayout" stretch="0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
@ -59,18 +72,18 @@
</item>
<item>
<widget class="QLabel" name="title">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>750</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="baseSize">
<size>
<width>128</width>
@ -80,18 +93,31 @@
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>12</pointsize>
<pointsize>25</pointsize>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color : white; font-family: Ubuntu;}</string>
<string notr="true">QLabel {
color : white;
font: 25pt &quot;Ubuntu&quot;;
background-color: rgba(0, 104, 200, 200);
border-radius: 15px;
}</string>
</property>
<property name="text">
<string># Would you like to try or install Lubuntu?</string>
<string>Lubuntu - Welcome to the Next Universe</string>
</property>
<property name="textFormat">
<enum>Qt::MarkdownText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
@ -113,7 +139,7 @@
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -140,6 +166,19 @@
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="tryLubuntu">
<property name="minimumSize">
@ -148,17 +187,31 @@
<height>75</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>75</height>
</size>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>24</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Try Lubuntu without installing it on your system. Allows you to use programs, browse the Web, and even temporarily install apps without modifying your system. Changes made within the live environment will be lost when the computer shuts down.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">QPushButton {
background-color: rgba(0, 104, 200, 100); color: white; border-radius: 15px;
}
QToolTip {
background-color: rgba(0, 104, 200, 100); color: white; border: 1px solid black;
}</string>
</property>
<property name="text">
<string>Try Lubuntu</string>
@ -178,6 +231,35 @@
</property>
</spacer>
</item>
<item>
<spacer name="titleStabilizer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>80</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="installLubuntu">
<property name="minimumSize">
@ -186,17 +268,47 @@
<height>75</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>75</height>
</size>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>24</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Install Lubuntu onto your system. You can install Lubuntu by itself, or alongside an existing operating system.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: rgba(0, 104, 200, 100); color: white; border-radius: 15px;
}
QToolTip {
background-color: rgba(0, 104, 200, 100); color: white; border: 1px solid black;
}</string>
</property>
<property name="text">
<string>Install Lubuntu</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
@ -212,6 +324,19 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
@ -225,6 +350,32 @@
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer_9">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">

Loading…
Cancel
Save