Mantid
Loading...
Searching...
No Matches
ColorTheme.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2026 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source
5// & Institut Laue - Langevin
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include <QGuiApplication>
10#include <QStyleHints>
11
12namespace MantidQt {
13namespace MantidWidgets {
14
15inline const QColor DARK_CANVAS_COLOUR("#1d1d1d");
16inline bool isDarkMode() { return QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark; }
17inline QColor defaultLineColour() { return isDarkMode() ? QColor(Qt::white) : QColor(Qt::black); }
18inline QColor canvasColour(const QColor &light = Qt::white) { return isDarkMode() ? DARK_CANVAS_COLOUR : light; }
19
20} // namespace MantidWidgets
21} // namespace MantidQt
QColor canvasColour(const QColor &light=Qt::white)
Definition ColorTheme.h:18
const QColor DARK_CANVAS_COLOUR("#1d1d1d")
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...