Let the icon set decide what the normal size is, but bound it to the

range between the hardcoded small and large sizes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38000 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-03-22 23:41:26 +00:00
parent 1546326762
commit 64bdffbac4

View File

@ -212,9 +212,21 @@ struct GuiView::GuiViewPrivate
{
// hardcode here the platform specific icon size
smallIconSize = 16; // scaling problems
normalIconSize = 22; // ok, default
normalIconSize = 22; // ok, default if iconsize.png is missing
bigIconSize = 26; // better for some math icons
// if it exists, use width of iconsize.png as normal size
FileName const fn = lyx::libFileSearch("images", "iconsize.png");
if (!fn.empty()) {
QImage image(toqstr(fn.absFileName()));
if (image.width() < int(smallIconSize))
normalIconSize = smallIconSize;
else if (image.width() > int(bigIconSize))
normalIconSize = bigIconSize;
else
normalIconSize = image.width();
}
splitter_ = new QSplitter;
bg_widget_ = new BackgroundWidget;
stack_widget_ = new QStackedWidget;