File indexing completed on 2024-06-16 04:56:14
0001 /* 0002 view/errorlabel.cpp 0003 0004 This file is part of Kleopatra, the KDE keymanager 0005 SPDX-FileCopyrightText: 2022 g10 Code GmbH 0006 SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #include <config-kleopatra.h> 0012 0013 #include "errorlabel.h" 0014 0015 #include <KColorScheme> 0016 0017 using namespace Kleo; 0018 0019 ErrorLabel::ErrorLabel(QWidget *parent) 0020 : QLabel{parent} 0021 { 0022 const auto colors = KColorScheme(QPalette::Active, KColorScheme::View); 0023 QPalette palette; 0024 palette.setBrush(QPalette::Window, colors.background(KColorScheme::NegativeBackground)); 0025 palette.setBrush(QPalette::WindowText, colors.foreground(KColorScheme::NegativeText)); 0026 setPalette(palette); 0027 } 0028 0029 ErrorLabel::~ErrorLabel() = default; 0030 0031 #include "moc_errorlabel.cpp"