From 06ba8a0f6a8d4fb07f43d1712cced767cf226caf Mon Sep 17 00:00:00 2001 From: Nils Fenner Date: Tue, 13 Oct 2015 19:02:28 +0200 Subject: [PATCH] set login dialog style via css stylesheet --- res.qrc | 1 + src/loginscreen.ui | 18 ------------------ src/nexus.cpp | 2 ++ ui/loginScreen/loginScreen.css | 12 ++++++++++++ 4 files changed, 15 insertions(+), 18 deletions(-) create mode 100644 ui/loginScreen/loginScreen.css diff --git a/res.qrc b/res.qrc index f020ecc20..dbee6bc1e 100644 --- a/res.qrc +++ b/res.qrc @@ -119,5 +119,6 @@ ui/volButton/volButtonDisabled.png img/login_logo.svg ui/notificationEdge/notificationEdge.css + ui/loginScreen/loginScreen.css diff --git a/src/loginscreen.ui b/src/loginscreen.ui index c1c0ab15e..a09aea4ab 100644 --- a/src/loginscreen.ui +++ b/src/loginscreen.ui @@ -631,15 +631,6 @@ margin-bottom:45px; true - - false - - - border-radius:5px; -padding:5px; -color:white; -background-color:#6cc865; - Create Profile @@ -996,15 +987,6 @@ margin-bottom:5px; true - - false - - - border-radius:5px; -padding:5px; -color:white; -background-color:#6cc865; - Load diff --git a/src/nexus.cpp b/src/nexus.cpp index 93f7ebda3..fe8877653 100644 --- a/src/nexus.cpp +++ b/src/nexus.cpp @@ -24,6 +24,7 @@ #include "persistence/settings.h" #include "video/camerasource.h" #include "widget/gui.h" +#include "widget/style.h" #include "widget/loginscreen.h" #include #include @@ -92,6 +93,7 @@ void Nexus::start() qRegisterMetaType>("std::shared_ptr"); loginScreen = new LoginScreen(); + loginScreen->setStyleSheet(Style::getStylesheet(":/ui/loginScreen/loginScreen.css")); #ifdef Q_OS_MAC globalMenuBar = new QMenuBar(0); diff --git a/ui/loginScreen/loginScreen.css b/ui/loginScreen/loginScreen.css new file mode 100644 index 000000000..91baaa1c9 --- /dev/null +++ b/ui/loginScreen/loginScreen.css @@ -0,0 +1,12 @@ +#loginButton, +#createAccountButton { + border-radius:5px; + padding:5px; + color:white; + background-color:#42a33a; +} + +#loginButton:hover, +#createAccountButton:hover { + background: #0c530d; +}