Global stylesheet for styles that should be applied application-wide.

This commit is contained in:
Nav
2021-12-18 18:05:31 +00:00
parent fc5cd3dc14
commit dd4cbcc597
5 changed files with 188 additions and 56 deletions

View File

@@ -55,6 +55,19 @@ void Insight::startup() {
QApplication::setQuitOnLastWindowClosed(true);
QApplication::setStyle(new BloomProxyStyle());
auto globalStylesheet = QFile(
QString::fromStdString(
Paths::compiledResourcesPath() + "/src/Insight/UserInterfaces/InsightWindow/Stylesheets/Global.qss"
)
);
if (!globalStylesheet.open(QFile::ReadOnly)) {
throw Exception("Failed to open global stylesheet file");
}
this->application.setStyleSheet(globalStylesheet.readAll());
qRegisterMetaType<Bloom::Targets::TargetDescriptor>();
qRegisterMetaType<Bloom::Targets::TargetPinDescriptor>();
qRegisterMetaType<Bloom::Targets::TargetPinState>();