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
11 #include "privacybrowserdebug.h"
14 MainView::MainView(QWidget *parent)
18 handleSettingsChanged();
25 void MainView::switchColors()
27 // switch the foreground/background colors of the label
28 QColor color = Settings::colorBackground();
29 Settings::setColorBackground(Settings::colorForeground());
30 Settings::setColorForeground(color);
32 handleSettingsChanged();
35 void MainView::handleSettingsChanged()
37 qCDebug(PRIVACYBROWSER) << "MainView::handleSettingsChanged()";
38 QPalette palette = m_ui.templateLabel->palette();
39 palette.setColor(QPalette::Window, Settings::colorBackground());
40 palette.setColor(QPalette::WindowText, Settings::colorForeground());
41 m_ui.templateLabel->setPalette(palette);
43 // i18n : internationalization
44 m_ui.templateLabel->setText(i18n("This project is %1 days old", Settings::ageInDays()));