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/core/lumina-desktop/BootSplash.cpp | |
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/core/lumina-desktop/BootSplash.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/BootSplash.cpp | 8 |
1 files changed, 7 insertions, 1 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; } |