]> git.lyx.org Git - lyx.git/commitdiff
Add comment
authorEnrico Forestieri <forenr@lyx.org>
Mon, 30 Mar 2015 23:26:48 +0000 (01:26 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 30 Mar 2015 23:26:48 +0000 (01:26 +0200)
src/insets/InsetInfo.cpp

index ac2fd03143be197d6fcc7e0d140283b439b050d3..9a9fc143a45ed8196ba8084dafe2bdf71e5e5466 100644 (file)
@@ -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);