From 19b526d4533841ca91209929f0d6aef6042a8eeb Mon Sep 17 00:00:00 2001 From: Max Sandholm Date: Thu, 16 Nov 2017 16:33:52 +0200 Subject: Use system color scheme (using a Qt stylesheet) #104 The color scheme of nheko obeys the default color theme of Qt (i.e. the system theme). It uses a Qt stylesheet to accomplish this, which means replacing the color theme with a custom theme would only be a matter of writing a new style sheet and loading it into the app. --- src/ui/OverlayWidget.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ui/OverlayWidget.cc') diff --git a/src/ui/OverlayWidget.cc b/src/ui/OverlayWidget.cc index c69f81f7..ccac0116 100644 --- a/src/ui/OverlayWidget.cc +++ b/src/ui/OverlayWidget.cc @@ -59,3 +59,14 @@ OverlayWidget::overlayGeometry() const return widget->rect(); } + +void +OverlayWidget::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event); + + QStyleOption opt; + opt.init(this); + QPainter p(this); + style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); +} -- cgit 1.5.1