the size of icons may be wrong when switching between sets with different
normal icon size. One needs to save the preferences, restart LyX and choose
"Normal-sized icons" from the toolbar menu to have the real normal size.
A minor glitch is that the name of the icon sets is translatable, but
currently only the translation for "Default" works. The problem is that I
don't know how to ask gettext for an inverse translation when saving the
preferences. Another possibility would be hardcoding the order of the names
in the combo box (such that to not rely on their names), but that is ugly
and prone to errors if/when other sets are added.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38041
a592a061-630c-0410-9148-
cb99ea01b6c8
<< "#\n\n";
case RC_ICON_SET:
- os << "\\icon_set \"" << icon_set << "\"\n";
if (ignore_system_lyxrc ||
icon_set != system_lyxrc.icon_set) {
os << "\\icon_set \"" << icon_set
case LyXRC::RC_GROUP_LAYOUTS:
case LyXRC::RC_HUNSPELLDIR_PATH:
case LyXRC::RC_ICON_SET:
+ if (lyxrc_orig.icon_set != lyxrc_new.icon_set) {
+ lyxrc.icon_set = lyxrc_new.icon_set;
+ }
case LyXRC::RC_INDEX_ALTERNATIVES:
case LyXRC::RC_INDEX_COMMAND:
case LyXRC::RC_JBIBTEX_COMMAND:
connect(displayGraphicsCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(instantPreviewCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
connect(previewSizeSB, SIGNAL(valueChanged(double)), this, SIGNAL(changed()));
+ connect(iconSetCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
connect(paragraphMarkerCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
}
break;
}
+ switch (iconSetCO->currentIndex()) {
+ case 0:
+ rc.icon_set.clear();
+ break;
+ default:
+ rc.icon_set = fromqstr(iconSetCO->currentText().toLower());
+ break;
+ }
+
rc.display_graphics = displayGraphicsCB->isChecked();
rc.preview_scale_factor = previewSizeSB->value();
rc.paragraph_markers = paragraphMarkerCB->isChecked();
break;
}
+ string name = rc.icon_set.empty() ? "default" : rc.icon_set;
+ name[0] = uppercase(name[0]);
+ int iconset = iconSetCO->findText(qt_(name));
+ if (iconset < 0)
+ iconset = 0;
+ iconSetCO->setCurrentIndex(iconset);
+
displayGraphicsCB->setChecked(rc.display_graphics);
instantPreviewCO->setEnabled(rc.display_graphics);
previewSizeSB->setValue(rc.preview_scale_factor);
</property>
</widget>
</item>
- <item row="2" column="0" colspan="2" >
+ <item row="2" column="0" >
+ <widget class="QLabel" name="iconSetLA" >
+ <property name="text" >
+ <string>Icon &Set:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>iconSetCO</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QComboBox" name="iconSetCO" >
+ <property name="toolTip" >
+ <string>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.</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Liber</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Oxygen</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2" >
<widget class="QCheckBox" name="paragraphMarkerCB" >
<property name="toolTip" >
<string>Mark end of paragraphs on screen with a pilcrow character.</string>
</property>
</widget>
</item>
- <item row="3" column="0" >
+ <item row="4" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>