2 SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}>
4 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
8 #include "privacybrowserpcview.h"
10 #include "PrivacyBrowserPCSettings.h"
11 #include "privacybrowserpcdebug.h"
14 PrivacyBrowserPCView::PrivacyBrowserPCView(QWidget *parent)
18 handleSettingsChanged();
21 PrivacyBrowserPCView::~PrivacyBrowserPCView()
25 void PrivacyBrowserPCView::switchColors()
27 // switch the foreground/background colors of the label
28 QColor color = PrivacyBrowserPCSettings::colorBackground();
29 PrivacyBrowserPCSettings::setColorBackground(PrivacyBrowserPCSettings::colorForeground());
30 PrivacyBrowserPCSettings::setColorForeground(color);
32 handleSettingsChanged();
35 void PrivacyBrowserPCView::handleSettingsChanged()
37 qCDebug(PRIVACYBROWSER) << "PrivacyBrowserPCView::handleSettingsChanged()";
38 QPalette palette = m_ui.templateLabel->palette();
39 palette.setColor(QPalette::Window, PrivacyBrowserPCSettings::colorBackground());
40 palette.setColor(QPalette::WindowText, PrivacyBrowserPCSettings::colorForeground());
41 m_ui.templateLabel->setPalette(palette);
43 // i18n : internationalization
44 m_ui.templateLabel->setText(i18n("This project is %1 days old", PrivacyBrowserPCSettings::ageInDays()));