Use CSS style sheet.

Avoid confusing text behind default transparent popup.
This commit is contained in:
SET
2020-11-03 14:15:11 +01:00
parent 980b172c96
commit 0bb61b7119
7 changed files with 34 additions and 2 deletions

View File

@@ -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()

View File

@@ -44,6 +44,8 @@ void PopupCertifyUserId::Create(vector<WString>& privateKeys,
{
m_fprKeyToSign = fprKeyToSign;
m_cwMain = static_cast<WContainerWidget*> (implementation());
// White in css file, like default background color.
m_cwMain->setStyleClass("popup");
WVBoxLayout * vblMain = new WVBoxLayout();
m_cwMain->setLayout(unique_ptr<WVBoxLayout> (vblMain));

View File

@@ -28,6 +28,8 @@ Deleter::~Deleter() {
void Deleter::Create() {
m_cwMain = static_cast<WContainerWidget*> (implementation());
// White in css file, like default background color.
m_cwMain->setStyleClass("popup");
WVBoxLayout * vblMain = new WVBoxLayout();
m_cwMain->setLayout(unique_ptr<WVBoxLayout> (vblMain));
m_cbConfirm = new WCheckBox(TR("Confirm"));

View File

@@ -31,6 +31,8 @@ void Uploader::Create() {
m_upload->setFileTextSize(10240); // Is really approximate
m_upload->setMultiple(false);
m_cwMain = static_cast<WContainerWidget*> (implementation());
// White in css file, like default background color.
m_cwMain->setStyleClass("popup");
WVBoxLayout * vblMain = new WVBoxLayout();
m_cwMain->setLayout(unique_ptr<WVBoxLayout> (vblMain));
vblMain->addWidget(unique_ptr<WFileUpload> (m_upload));

10
WTAPPROOT/K7/K7.css Normal file
View File

@@ -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;
}

View File

@@ -52,6 +52,17 @@
kind="IMPORTANT_FILES_FOLDER">
<itemPath>Makefile</itemPath>
</logicalFolder>
<logicalFolder name="TestFiles"
displayName="Test Files"
projectFiles="false"
kind="TEST_LOGICAL_FOLDER">
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false"
kind="IMPORTANT_FILES_FOLDER">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<projectmakefile>Makefile</projectmakefile>
<confs>

View File

@@ -13,8 +13,6 @@
<gdb_interceptlist>
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
</gdb_interceptlist>
<gdb_signals>
</gdb_signals>
<gdb_options>
<DebugOptions>
</DebugOptions>
@@ -27,6 +25,7 @@
<runprofile version="9">
<runcommandpicklist>
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
<runcommandpicklistitem>"${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</runcommandpicklistitem>
<runcommandpicklistitem>"${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</runcommandpicklistitem>
</runcommandpicklist>
<runcommand>"${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</runcommand>