1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-05-01 14:47:27 +02:00

For dark theme also rewrite Standard library color to dark blue

This changes the background colour for the Standard library to dark blue,
even when loading from file.  Potentially this could check for the
standard #d4f8ff value before doing this in case someone had manually
customised their `objects_init.xml` template but I think that would be
better to wait for a proper theming solution.
This commit is contained in:
Andrew McMillan 2018-12-24 16:57:50 +00:00
parent b8ced0cbb8
commit 2470c3dfb9

View File

@ -1048,6 +1048,12 @@ bool ProjectPanel::loadFromRCS(RCS *_rcs)
objdb->load( Constants::getStandardObjectsFilePath(),
&upgrade_predicate, Constants::getDTDDirectory());
objdb->setFileName("");
if ( qGray(palette().color(QPalette::Window).rgba()) < 100) {
FWObject *stdLib = objdb->findObjectByName(Library::TYPENAME, "Standard");
stdLib->setReadOnly(false);
stdLib->setStr("color", "#0a0f1f");
objdb->setDirty(false);
}
// objects from a data file are in database ndb