diff options
author | Ken Moore <ken@ixsystems.com> | 2016-11-30 09:45:08 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-11-30 09:45:08 -0500 |
commit | e3d638e4b0e95da0b1cac6a4b0fd136cd533788a (patch) | |
tree | 646ccf5abbfbb28a29c0c7af0d17361a723b2ac6 /src-qt5 | |
parent | Fix a recursive bug in the parenthesis matching/replacing routine within lumi... (diff) | |
download | lumina-e3d638e4b0e95da0b1cac6a4b0fd136cd533788a.tar.gz lumina-e3d638e4b0e95da0b1cac6a4b0fd136cd533788a.tar.bz2 lumina-e3d638e4b0e95da0b1cac6a4b0fd136cd533788a.zip |
Cleanup the bootsplash a bit:
1) Move the loading message/progress to the bottom of the window.
2) Move the loading icon to the top-left side
3) Implement the (optional) usage of the "fortune" utility for a random/short message during the loading process.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/lumina-desktop/BootSplash.cpp | 8 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/BootSplash.ui | 197 |
2 files changed, 139 insertions, 66 deletions
diff --git a/src-qt5/core/lumina-desktop/BootSplash.cpp b/src-qt5/core/lumina-desktop/BootSplash.cpp index e75bca21..e8a2decc 100644 --- a/src-qt5/core/lumina-desktop/BootSplash.cpp +++ b/src-qt5/core/lumina-desktop/BootSplash.cpp @@ -2,6 +2,7 @@ #include "ui_BootSplash.h" #include <LuminaXDG.h> +#include <LUtils.h> BootSplash::BootSplash() : QWidget(0, Qt::SplashScreen | Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint | Qt::WindowDoesNotAcceptFocus), ui(new Ui::BootSplash){ ui->setupUi(this); @@ -9,6 +10,11 @@ BootSplash::BootSplash() : QWidget(0, Qt::SplashScreen | Qt::X11BypassWindowMana //Center the window on the primary screen QPoint ctr = QApplication::desktop()->screenGeometry().center(); this->move( ctr.x()-(this->width()/2), ctr.y()-(this->height()/2) ); + if(LUtils::isValidBinary("fortune")){ + QString random = LUtils::getCmdOutput("fortune -s").join("\n").simplified(); + if(random.endsWith("\n")){ random.chop(1); } + ui->label_welcome->setText( "\""+random+"\"" ); + } } void BootSplash::showScreen(QString loading){ //update icon, text, and progress @@ -40,7 +46,7 @@ void BootSplash::showScreen(QString loading){ //update icon, text, and progress icon = "preferences-desktop-wallpaper"; }else if(loading=="final"){ txt = tr("Finalizing …"); per = 90; - icon = "pcbsd"; + icon = "start-here-lumina"; }else if(loading.startsWith("app::")){ txt = QString(tr("Starting App: %1")).arg(loading.section("::",1,50)); per = -1; } diff --git a/src-qt5/core/lumina-desktop/BootSplash.ui b/src-qt5/core/lumina-desktop/BootSplash.ui index 867b658c..7b2bebf9 100644 --- a/src-qt5/core/lumina-desktop/BootSplash.ui +++ b/src-qt5/core/lumina-desktop/BootSplash.ui @@ -6,82 +6,149 @@ <rect> <x>0</x> <y>0</y> - <width>280</width> - <height>127</height> + <width>314</width> + <height>194</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="4"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>1</number> + </property> + <property name="leftMargin"> + <number>1</number> + </property> + <property name="topMargin"> + <number>1</number> + </property> + <property name="rightMargin"> + <number>1</number> + </property> + <property name="bottomMargin"> + <number>1</number> + </property> + <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="2" column="0"> + <spacer name="verticalSpacer"> + <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 row="1" column="0"> + <widget class="QLabel" name="label_icon"> + <property name="minimumSize"> + <size> + <width>64</width> + <height>64</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>64</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string notr="true"/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="0" column="0"> + <spacer name="verticalSpacer_2"> + <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 row="0" column="1" rowspan="3"> + <widget class="QLabel" name="label_welcome"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Welcome to the Lumina Desktop Environment!</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_icon"> - <property name="minimumSize"> - <size> - <width>64</width> - <height>64</height> - </size> - </property> - <property name="text"> - <string notr="true"/> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="0" column="0" rowspan="2"> - <widget class="QProgressBar" name="progressBar"> - <property name="value"> - <number>0</number> - </property> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="format"> - <string/> - </property> - </widget> - </item> - <item row="0" column="1"> - <spacer name="horizontalSpacer_2"> + <item> + <widget class="Line" name="line"> <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 row="1" column="1" colspan="4"> - <widget class="QLabel" name="label_text"> - <property name="text"> - <string notr="true">Some loading message</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> </widget> </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QProgressBar" name="progressBar"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="value"> + <number>0</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="format"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_text"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string notr="true">Some loading message</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> </layout> </widget> <resources/> |