From f51662928579db1e44bd0fb024e6b65eb02f6add Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 31 Mar 2015 01:26:48 +0200 Subject: [PATCH] Add comment --- src/insets/InsetInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index ac2fd03143..9a9fc143a4 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -420,6 +420,10 @@ void InsetInfo::updateInfo() break; int percent_scale = 100; if (use_gui) { + // Compute the scale factor for the icon such its + // width on screen is equal to 1em in pixels. + // The scale factor is rounded to the integer nearest + // to the float value of the ratio 100*iconsize/imgsize. int imgsize = QImage(toqstr(file.absFileName())).width(); if (imgsize > 0) { int iconsize = Length(1, Length::EM).inPixels(1); -- 2.39.2