From 3a8aee3ab0a4752eee488bd2a123b9bece757ab3 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 16 Jun 2011 16:47:10 +0200 Subject: black background... --- src/fbsplash.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/fbsplash.cpp') diff --git a/src/fbsplash.cpp b/src/fbsplash.cpp index c2f52bb..7df12ab 100644 --- a/src/fbsplash.cpp +++ b/src/fbsplash.cpp @@ -1,28 +1,29 @@ #include "fbsplash.h" -fbsplash::fbsplash(){ - - qDebug() << "*fbsplash init*"; - +fbsplash::fbsplash() : + QMainWindow() { + + qDebug() << "fbsplash init"; + createQuitAction(); setupTheme(); - + setAttribute(Qt::WA_QuitOnClose, true); setWindowFlags(Qt::FramelessWindowHint); showFullScreen(); } //----------------------------------------------------------------------------- -void fbsplash::setupTheme(){ +void fbsplash::setupTheme() { // TODO configurable per cmdline // for now, black as base background color QPalette pal; - pal.setColor(QPalette::Base, Qt::black); - this->setPalette(pal); + pal.setColor(QPalette::Window, Qt::black); + setPalette(pal); } //----------------------------------------------------------------------------- -void fbsplash::createQuitAction(){ +void fbsplash::createQuitAction() { _quit = new QAction(tr("&quit"), this); _quit->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_X)); this->addAction(_quit); connect(_quit, SIGNAL(triggered()), this, SLOT(close())); -} \ No newline at end of file +} -- cgit v1.2.3-55-g7522