-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8535217
commit 3c011bd
Showing
5 changed files
with
3 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2019-2024 Kevin B. Hendricks, Stratford Ontario Canada | ||
** Copyright (C) 2019-2020 Doug Massay | ||
** Copyright (C) 2019-2024 Doug Massay | ||
** Copyright (C) 2012 John Schember <[email protected]> | ||
** Copyright (C) 2012 Grant Drake | ||
** | ||
|
@@ -36,10 +36,7 @@ | |
#include "Utility.h" | ||
|
||
AppearanceWidget::AppearanceWidget() | ||
: m_isHighDPIComboEnabled(false) | ||
{ | ||
// Disable the HighDPI combobox on all platforms under Qt6 | ||
m_isHighDPIComboEnabled = false; | ||
|
||
ui.setupUi(this); | ||
|
||
|
@@ -48,19 +45,6 @@ AppearanceWidget::AppearanceWidget() | |
ui.grpCustomDarkStyle->setVisible(false); | ||
#endif | ||
|
||
// setup the HighDPI combo box here | ||
ui.comboHighDPI->addItems({tr("Detect"), tr("On"), tr("Off")}); | ||
QString highdpi_tooltip = "<p><dt><b>" + tr("Detect") + "</b><dd>" + tr("Detect whether any high dpi scaling should take place."); | ||
highdpi_tooltip += " " + tr("Defers to any Qt environment variables that are set to control high dpi behavior.") + "</dd>"; | ||
highdpi_tooltip += "<dt><b>" + tr("On") + "</b><dd>" + tr("Turns on high dpi scaling and ignores any Qt environment variables"); | ||
highdpi_tooltip += " " + tr("that are set controlling high dpi behavior.") + "</dd>"; | ||
highdpi_tooltip += "<dt><b>" + tr("Off") + "</b><dd>" + tr("Turns off high dpi scaling regardless if any Qt environment"); | ||
highdpi_tooltip += " " + tr("variables controlling high dpi behavior are set.") + "</dd>"; | ||
ui.comboHighDPI->setToolTip(highdpi_tooltip); | ||
|
||
// The HighDPI setting is unused/unnecessary on Mac | ||
ui.comboHighDPI->setEnabled(m_isHighDPIComboEnabled); | ||
|
||
m_uiFontResetFlag = false; | ||
|
||
readSettings(); | ||
|
@@ -74,10 +58,6 @@ PreferencesWidget::ResultActions AppearanceWidget::saveSettings() | |
settings.setPreviewDark(ui.PreviewDarkInDM->isChecked() ? 1 : 0); | ||
// This setting has no effect on other OSes, but it won't hurt to set it. | ||
settings.setUiUseCustomDarkTheme(ui.chkDarkStyle->isChecked() ? 1 : 0); | ||
// Don't try to get the index of a disabled combobox | ||
if (m_isHighDPIComboEnabled) { | ||
settings.setHighDPI(ui.comboHighDPI->currentIndex()); | ||
} | ||
settings.setUIFont(m_currentUIFont); | ||
|
||
SettingsStore::WebViewAppearance WVAppearance; | ||
|
@@ -109,12 +89,6 @@ PreferencesWidget::ResultActions AppearanceWidget::saveSettings() | |
if (m_PreviewDark != (ui.PreviewDarkInDM->isChecked() ? 1 : 0)) { | ||
results = results | PreferencesWidget::ResultAction_ReloadPreview; | ||
} | ||
// Don't try to get the index of a disabled combobox | ||
if (m_isHighDPIComboEnabled) { | ||
if (m_HighDPI != (ui.comboHighDPI->currentIndex())) { | ||
results = results | PreferencesWidget::ResultAction_RestartPageEdit; | ||
} | ||
} | ||
if ((m_currentUIFont != m_initUIFont) || m_uiFontResetFlag) { | ||
results = results | PreferencesWidget::ResultAction_RestartPageEdit; | ||
} | ||
|
@@ -148,11 +122,6 @@ void AppearanceWidget::readSettings() | |
ui.webViewFontSizeSpin->setValue(WVAppearance.font_size); | ||
ui.specialCharacterFontSizeSpin->setValue(specialCharacterAppearance.font_size); | ||
ui.iconSizeSlider->setValue(int(settings.mainMenuIconSize()*10)); | ||
// Don't try to set the index of a disabled combobox | ||
if (m_isHighDPIComboEnabled) { | ||
m_HighDPI = settings.highDPI(); | ||
ui.comboHighDPI->setCurrentIndex(m_HighDPI); | ||
} | ||
if (!settings.uiFont().isEmpty()) { | ||
m_initUIFont = settings.uiFont(); | ||
} else { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/************************************************************************ | ||
** | ||
** Copyright (C) 2019-2023 Kevin B. Hendricks, Stratford, Ontario, Canada | ||
** Copyright (C) 2016-2024 Kevin B. Hendricks, Stratford, ON | ||
** Copyright (C) 2016-2024 Doug Massay | ||
** Copyright (C) 2011-2013 John Schember <[email protected]> | ||
** Copyright (C) 2012-2013 Dave Heiland | ||
** | ||
|
@@ -57,8 +58,6 @@ class SettingsStore : public QSettings | |
|
||
QString originalUIFont(); | ||
|
||
int highDPI(); | ||
|
||
bool disableGPU(); | ||
|
||
int previewDark(); | ||
|
@@ -147,7 +146,6 @@ public slots: | |
|
||
void setOriginalUIFont(const QString &font_data); | ||
|
||
void setHighDPI(int value); | ||
|
||
void setDisableGPU(bool value); | ||
|
||
|