diff --git a/K7Main.cpp b/K7Main.cpp index d8d0cf3..81f004b 100644 --- a/K7Main.cpp +++ b/K7Main.cpp @@ -58,6 +58,12 @@ K7Main::K7Main(const WEnvironment& env) OwnerTrustLevel[GpgME::Key::OwnerTrust::Unknown] = TR("UidUnknown"); m_uploader = NULL; m_deleter = NULL; m_keyEdit = new KeyEdit(this); + + WLink link; + const WString cssFile = WApplication::appRoot() + _APPNAME_ + + WString(".css"); + link.setUrl(cssFile.toUTF8()); + WApplication::useStyleSheet(link); } K7Main::~K7Main() diff --git a/PopupCertifyUserId.cpp b/PopupCertifyUserId.cpp index 78f0186..3f5f6ae 100644 --- a/PopupCertifyUserId.cpp +++ b/PopupCertifyUserId.cpp @@ -44,6 +44,8 @@ void PopupCertifyUserId::Create(vector& privateKeys, { m_fprKeyToSign = fprKeyToSign; m_cwMain = static_cast (implementation()); + // White in css file, like default background color. + m_cwMain->setStyleClass("popup"); WVBoxLayout * vblMain = new WVBoxLayout(); m_cwMain->setLayout(unique_ptr (vblMain)); diff --git a/PopupDeleter.cpp b/PopupDeleter.cpp index a7c638a..ee48801 100644 --- a/PopupDeleter.cpp +++ b/PopupDeleter.cpp @@ -28,6 +28,8 @@ Deleter::~Deleter() { void Deleter::Create() { m_cwMain = static_cast (implementation()); + // White in css file, like default background color. + m_cwMain->setStyleClass("popup"); WVBoxLayout * vblMain = new WVBoxLayout(); m_cwMain->setLayout(unique_ptr (vblMain)); m_cbConfirm = new WCheckBox(TR("Confirm")); diff --git a/PopupUploader.cpp b/PopupUploader.cpp index fd69ea4..45659a3 100644 --- a/PopupUploader.cpp +++ b/PopupUploader.cpp @@ -31,6 +31,8 @@ void Uploader::Create() { m_upload->setFileTextSize(10240); // Is really approximate m_upload->setMultiple(false); m_cwMain = static_cast (implementation()); + // White in css file, like default background color. + m_cwMain->setStyleClass("popup"); WVBoxLayout * vblMain = new WVBoxLayout(); m_cwMain->setLayout(unique_ptr (vblMain)); vblMain->addWidget(unique_ptr (m_upload)); diff --git a/WTAPPROOT/K7/K7.css b/WTAPPROOT/K7/K7.css new file mode 100644 index 0000000..2e289cf --- /dev/null +++ b/WTAPPROOT/K7/K7.css @@ -0,0 +1,10 @@ +/* + * Default page color is white. + * Default popup background is transparent. + * Can't use inherit : + * root()->decorationStyle().backgroundColor().{red,green, blue} + * are all 0. +*/ +div.popup { + background-color: lavender; +} diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml index dabe06a..0332d86 100644 --- a/nbproject/configurations.xml +++ b/nbproject/configurations.xml @@ -52,6 +52,17 @@ kind="IMPORTANT_FILES_FOLDER"> Makefile + + + + Makefile + Makefile diff --git a/nbproject/private/configurations.xml b/nbproject/private/configurations.xml index 3db8f9e..2c9b830 100644 --- a/nbproject/private/configurations.xml +++ b/nbproject/private/configurations.xml @@ -13,8 +13,6 @@ - - @@ -27,6 +25,7 @@ "${OUTPUT_PATH}" + "${OUTPUT_PATH}" --docroot ../../../ --https-address localhost --https-port 8080 --ssl-client-verification required --ssl-ca-certificates /home/user/tmp/ca.crt --ssl-certificate /home/user/tmp/cert.pem --ssl-private-key /home/user/tmp/cert.key --ssl-tmp-dh /home/user/tmp/dh.pem "${OUTPUT_PATH}" --docroot . --https-address localhost --https-port 8080 --ssl-client-verification required --ssl-ca-certificates /home/user/tmp/ca.crt --ssl-certificate /home/user/tmp/cert.pem --ssl-private-key /home/user/tmp/cert.key --ssl-tmp-dh /home/user/tmp/dh.pem "${OUTPUT_PATH}" --docroot . --https-address localhost --https-port 8080 --ssl-client-verification required --ssl-ca-certificates /home/user/tmp/ca.crt --ssl-certificate /home/user/tmp/cert.pem --ssl-private-key /home/user/tmp/cert.key --ssl-tmp-dh /home/user/tmp/dh.pem