Compare commits

..

No commits in common. "e7855603496688b36f15afb34b1d7507d637e64f" and "5e616be3a4ca9705309014d1dc9853adab5dab87" have entirely different histories.

7 changed files with 47 additions and 81 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

View File

@ -6,7 +6,6 @@
#include <QScreen> #include <QScreen>
#include <QMessageBox> #include <QMessageBox>
#include <QLineEdit> #include <QLineEdit>
#include <QGraphicsDropShadowEffect>
#include "installerprompt.h" #include "installerprompt.h"
#include "./ui_installerprompt.h" #include "./ui_installerprompt.h"
@ -16,7 +15,7 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
ui->setupUi(this); ui->setupUi(this);
// Set the background image and scale it // Set the background image and scale it
QPixmap bg(":/background"); QPixmap bg("/usr/share/lubuntu/installer-prompt/background.png");
if (bg.isNull()) { if (bg.isNull()) {
QMessageBox::warning(this, tr("Error"), tr("Background image cannot be loaded.")); QMessageBox::warning(this, tr("Error"), tr("Background image cannot be loaded."));
return; return;
@ -68,11 +67,11 @@ bool InstallerPrompt::checkInternetConnection() {
void InstallerPrompt::updateConnectionStatus(bool online) { void InstallerPrompt::updateConnectionStatus(bool online) {
if (online) { if (online) {
ui->connectionStatusLabel->setText(tr("Connected to the internet")); connectionStatusLabel->setText(tr("Connected to the internet"));
ui->connectWifiButton->setVisible(false); connectWifiButton->setVisible(false);
} else { } else {
ui->connectionStatusLabel->setText(tr("Not connected to the internet")); connectionStatusLabel->setText(tr("Not connected to the internet"));
ui->connectWifiButton->setVisible(true); connectWifiButton->setVisible(true);
} }
} }

View File

@ -21,12 +21,13 @@
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget { <string notr="true">QWidget {
color: #000000; color: #000000; /* Set text color to black */
} }
QPushButton { QPushButton {
background-color: rgba(30, 144, 255, 0.8); background-color: rgba(30, 144, 255, 0.8);
color: #ffffff; color: #ffffff;
border: 2px solid #ffffff;
border-radius: 15px; border-radius: 15px;
padding: 10px 20px; padding: 10px 20px;
margin: 10px; margin: 10px;
@ -52,14 +53,7 @@ QComboBox, QLineEdit {
QLabel { QLabel {
qproperty-alignment: 'AlignCenter'; qproperty-alignment: 'AlignCenter';
color: #ffffff; }</string>
}
QLabel#logoLabel {
image: url(:/logo);
background-color: transparent;
}
</string>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<property name="sizePolicy"> <property name="sizePolicy">
@ -113,7 +107,7 @@ QLabel#logoLabel {
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="logoLabel"> <widget class="QLabel" name="title">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -123,7 +117,7 @@ QLabel#logoLabel {
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>750</width> <width>750</width>
<height>100</height> <height>64</height>
</size> </size>
</property> </property>
<property name="baseSize"> <property name="baseSize">
@ -135,6 +129,7 @@ QLabel#logoLabel {
<property name="font"> <property name="font">
<font> <font>
<family>Ubuntu</family> <family>Ubuntu</family>
<pointsize>25</pointsize>
<weight>50</weight> <weight>50</weight>
<italic>false</italic> <italic>false</italic>
<bold>false</bold> <bold>false</bold>
@ -144,10 +139,15 @@ QLabel#logoLabel {
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true">QLabel {
color : white;
font: 25pt &quot;Ubuntu&quot;;
background-color: rgba(0, 104, 200, 200);
border-radius: 15px;
}</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string>Lubuntu - Welcome to the Next Universe</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::MarkdownText</enum> <enum>Qt::MarkdownText</enum>
@ -207,7 +207,7 @@ QLabel#logoLabel {
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>14</pointsize> <pointsize>20</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -221,7 +221,7 @@ QLabel#logoLabel {
<widget class="QComboBox" name="languageComboBox"> <widget class="QComboBox" name="languageComboBox">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>352</width> <width>400</width>
<height>50</height> <height>50</height>
</size> </size>
</property> </property>
@ -280,13 +280,13 @@ QLabel#logoLabel {
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="font"> <property name="font">
<font> <font>
<pointsize>14</pointsize> <pointsize>20</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Select a Wi-Fi Network:</string> <string>Select a WiFi Network:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -294,7 +294,7 @@ QLabel#logoLabel {
<widget class="QComboBox" name="networkComboBox"> <widget class="QComboBox" name="networkComboBox">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>352</width> <width>400</width>
<height>50</height> <height>50</height>
</size> </size>
</property> </property>
@ -311,17 +311,18 @@ QLabel#logoLabel {
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>65</height> <height>50</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>65</height> <height>50</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>14</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -365,6 +366,7 @@ QLabel#logoLabel {
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="font"> <property name="font">
<font> <font>
<pointsize>14</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -447,22 +449,20 @@ QLabel#logoLabel {
<widget class="QPushButton" name="tryLubuntu"> <widget class="QPushButton" name="tryLubuntu">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>300</width> <width>250</width>
<height>125</height> <height>75</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>125</height> <height>75</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Ubuntu</family> <family>Ubuntu</family>
<pointsize>24</pointsize> <pointsize>24</pointsize>
<weight>75</weight>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -480,17 +480,7 @@ QToolTip {
}</string> }</string>
</property> </property>
<property name="text"> <property name="text">
<string> Try Lubuntu</string> <string>Try Lubuntu</string>
</property>
<property name="icon">
<iconset resource="resource.qrc">
<normaloff>:/symbol</normaloff>:/symbol</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -524,22 +514,20 @@ QToolTip {
<widget class="QPushButton" name="installLubuntu"> <widget class="QPushButton" name="installLubuntu">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>300</width> <width>250</width>
<height>125</height> <height>75</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>125</height> <height>75</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Ubuntu</family> <family>Ubuntu</family>
<pointsize>24</pointsize> <pointsize>24</pointsize>
<weight>75</weight>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -554,17 +542,7 @@ QToolTip {
}</string> }</string>
</property> </property>
<property name="text"> <property name="text">
<string> Install Lubuntu</string> <string>Install Lubuntu</string>
</property>
<property name="icon">
<iconset resource="resource.qrc">
<normaloff>:/installer</normaloff>:/installer</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -680,9 +658,7 @@ QToolTip {
<widget class="QLabel" name="connectionStatusLabel"> <widget class="QLabel" name="connectionStatusLabel">
<property name="font"> <property name="font">
<font> <font>
<pointsize>18</pointsize> <pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -723,8 +699,6 @@ QToolTip {
</widget> </widget>
<widget class="QStatusBar" name="statusbar"/> <widget class="QStatusBar" name="statusbar"/>
</widget> </widget>
<resources> <resources/>
<include location="resource.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -5,21 +5,22 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
QList<InstallerPrompt*> ws; QList<InstallerPrompt*> windows;
// Iterate through all available screens // Iterate through all available screens
for (QScreen *screen : QApplication::screens()) { for (QScreen *screen : QApplication::screens()) {
InstallerPrompt *w = new InstallerPrompt(); InstallerPrompt *window = new InstallerPrompt();
w->setGeometry(screen->geometry()); window->setGeometry(screen->geometry());
w->show(); window->show();
ws.append(w); windows.append(window);
} }
for (InstallerPrompt *w : ws) { // Connect signals and slots to synchronize state across windows
for (InstallerPrompt *otherWindow : ws) { for (InstallerPrompt *window : windows) {
if (w != otherWindow) { for (InstallerPrompt *otherWindow : windows) {
if (window != otherWindow) {
// Connect signals and slots for synchronization // Connect signals and slots for synchronization
// Example: connect(ws.last(), &InstallerPrompt::someSignal, otherWindow, &InstallerPrompt::someSlot); // Example: connect(window, &InstallerPrompt::someSignal, otherWindow, &InstallerPrompt::someSlot);
} }
} }
} }

View File

@ -1,8 +0,0 @@
<RCC>
<qresource prefix="/">
<file alias="logo">../img/lubuntu-logo.png</file>
<file alias="background">../img/background.png</file>
<file alias="installer">../img/installer.png</file>
<file alias="symbol">../img/symbol.png</file>
</qresource>
</RCC>