From: Enrico Forestieri Date: Sun, 27 Mar 2011 19:07:09 +0000 (+0000) Subject: Automatically set the normal icon size on restart if the the icon set changed. X-Git-Tag: 2.0.0~393 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=12baf18cfaca80899ea1e8e8ead976c1e9c8ed14;p=features.git Automatically set the normal icon size on restart if the the icon set changed. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38076 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index a09dced792..0579c32ba7 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -626,7 +626,16 @@ bool GuiView::restoreLayout() return false; //code below is skipped when when ~/.config/LyX is (re)created - setIconSize(settings.value(icon_key).toSize()); + QSize icon_size = settings.value(icon_key).toSize(); + // Check whether session size changed. + if (icon_size.width() != d.smallIconSize && + icon_size.width() != d.normalIconSize && + icon_size.width() != d.bigIconSize) { + icon_size.setWidth(d.normalIconSize); + icon_size.setHeight(d.normalIconSize); + } + setIconSize(icon_size); + #ifdef Q_WS_X11 QPoint pos = settings.value("pos", QPoint(50, 50)).toPoint(); QSize size = settings.value("size", QSize(690, 510)).toSize(); diff --git a/src/frontends/qt4/ui/PrefUi.ui b/src/frontends/qt4/ui/PrefUi.ui index cb90b72b61..76898fb8fd 100644 --- a/src/frontends/qt4/ui/PrefUi.ui +++ b/src/frontends/qt4/ui/PrefUi.ui @@ -65,7 +65,7 @@ - The icon set to use. Warning: size of icons may be wrong until you save the preferences, restart LyX and choose "Normal-sized icons" from the toolbar menu. + The icon set to use. Warning: normal size of icons may be wrong until you save the preferences and restart LyX.