[LyX/master] Two more icon scale fixes

Juergen Spitzmueller spitz at lyx.org
Sat Mar 11 14:08:04 UTC 2023


commit 548c5ba92dfd2d4d845266e392748ad18ff1ec04
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Mar 11 16:10:52 2023 +0100

    Two more icon scale fixes
---
 src/frontends/qt/ButtonController.cpp |    3 ++-
 src/frontends/qt/GuiApplication.cpp   |    6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/ButtonController.cpp b/src/frontends/qt/ButtonController.cpp
index a2c7359..e347f2d 100644
--- a/src/frontends/qt/ButtonController.cpp
+++ b/src/frontends/qt/ButtonController.cpp
@@ -88,7 +88,8 @@ bool CheckedLineEdit::check() const
 		}
 		setValid(target_, valid);
 		if (!valid && tab_index_ >= 0 && qobject_cast<QTabWidget*>(target_) != nullptr) {
-			QIcon warn(getPixmap("images/", "emblem-shellescape", "svgz,png"));
+			QIcon warn(guiApp ? guiApp->getScaledPixmap("images/", "emblem-shellescape")
+					  : getPixmap("images/", "emblem-shellescape", "svgz,png"));
 			QTabBar * tb = qobject_cast<QTabWidget*>(target_)->tabBar();
 			tb->setTabIcon(tab_index_, warn);
 			tb->setTabToolTip(tab_index_, qt_("This tab contains invalid input. Please fix!"));
diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index cee49ad..0fd63a3 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -2842,8 +2842,10 @@ QAbstractItemModel * GuiApplication::languageModel()
 
 	QStandardItemModel * lang_model = new QStandardItemModel(this);
 	lang_model->insertColumns(0, 3);
-	QIcon speller(getPixmap("images/", "dialog-show_spellchecker", "svgz,png"));
-	QIcon saurus(getPixmap("images/", "thesaurus-entry", "svgz,png"));
+	QIcon speller(guiApp ? guiApp->getScaledPixmap("images/", "dialog-show_spellchecker")
+			  : getPixmap("images/", "dialog-show_spellchecker", "svgz,png"));
+	QIcon saurus(guiApp ? guiApp->getScaledPixmap("images/", "thesaurus-entry")
+			  : getPixmap("images/", "thesaurus-entry", "svgz,png"));
 	Languages::const_iterator it = lyx::languages.begin();
 	Languages::const_iterator end = lyx::languages.end();
 	for (; it != end; ++it) {


More information about the lyx-cvs mailing list