mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #257: Force light mode (or dark mode)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2019-2021 Jakub Melka
|
||||
// Copyright (C) 2019-2025 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef PDFVIEWERSETTINGS_H
|
||||
#define PDFVIEWERSETTINGS_H
|
||||
|
||||
#include "pdfviewerglobal.h"
|
||||
#include "pdfglobal.h"
|
||||
#include "pdfrenderer.h"
|
||||
#include "pdfcms.h"
|
||||
@@ -31,7 +32,7 @@ class QSettings;
|
||||
namespace pdfviewer
|
||||
{
|
||||
|
||||
class PDFViewerSettings : public QObject
|
||||
class PDF4QTLIBGUILIBSHARED_EXPORT PDFViewerSettings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -42,6 +43,13 @@ public:
|
||||
|
||||
}
|
||||
|
||||
enum ColorScheme
|
||||
{
|
||||
AutoScheme,
|
||||
LightScheme,
|
||||
DarkScheme
|
||||
};
|
||||
|
||||
struct Settings
|
||||
{
|
||||
Settings();
|
||||
@@ -94,6 +102,9 @@ public:
|
||||
|
||||
// Bookmarks settings
|
||||
bool m_autoGenerateBookmarks;
|
||||
|
||||
// UI Dark/Light mode settings
|
||||
ColorScheme m_colorScheme;
|
||||
};
|
||||
|
||||
const Settings& getSettings() const { return m_settings; }
|
||||
@@ -132,6 +143,11 @@ public:
|
||||
|
||||
pdf::PDFExecutionPolicy::Strategy getMultithreadingStrategy() const { return m_settings.m_multithreadingStrategy; }
|
||||
|
||||
ColorScheme getColorScheme() const;
|
||||
void setColorScheme(ColorScheme colorScheme);
|
||||
|
||||
static ColorScheme getColorSchemeStatic();
|
||||
|
||||
signals:
|
||||
void settingsChanged();
|
||||
|
||||
|
Reference in New Issue
Block a user