]> git.lyx.org Git - features.git/commitdiff
Automatically set the normal icon size on restart if the the icon set changed.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 27 Mar 2011 19:07:09 +0000 (19:07 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 27 Mar 2011 19:07:09 +0000 (19:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38076 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/ui/PrefUi.ui

index a09dced79211d64fa971ea4b81900f6b649f0f80..0579c32ba7fb427fffbbf52decca8d35409e1d35 100644 (file)
@@ -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();
index cb90b72b619c3a2f8e8f70b19756c92c5d3d4607..76898fb8fd5d09259c5a281345c7da3bca2cbf55 100644 (file)
@@ -65,7 +65,7 @@
    <item row="1" column="1" >
     <widget class="QComboBox" name="iconSetCO" >
      <property name="toolTip" >
-      <string>The icon set to use. Warning: size of icons may be wrong&#x0a;until you save the preferences, restart LyX and choose&#x0a;"Normal-sized icons" from the toolbar menu.</string>
+      <string>The icon set to use. Warning: normal size of icons may be&#x0a;wrong until you save the preferences and restart LyX.</string>
      </property>
     </widget>
    </item>