mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Use scaling factor in XHTML output.
This commit is contained in:
parent
e1f597e3da
commit
47c52db13e
@ -962,10 +962,20 @@ docstring InsetGraphics::xhtml(XHTMLStream & xs, OutputParams const & op) const
|
|||||||
// really be better to do width and height conversion, rather than to output
|
// really be better to do width and height conversion, rather than to output
|
||||||
// these parameters here.
|
// these parameters here.
|
||||||
string imgstyle;
|
string imgstyle;
|
||||||
if (!params().width.zero())
|
bool const havewidth = !params().width.zero();
|
||||||
imgstyle += "width:" + params().width.asHTMLString() + ";";
|
bool const haveheight = !params().height.zero();
|
||||||
if (!params().height.zero())
|
if (havewidth || haveheight) {
|
||||||
imgstyle += " height:" + params().height.asHTMLString() + ";";
|
if (havewidth)
|
||||||
|
imgstyle += "width:" + params().width.asHTMLString() + ";";
|
||||||
|
if (haveheight)
|
||||||
|
imgstyle += " height:" + params().height.asHTMLString() + ";";
|
||||||
|
} else if (params().scale != "100") {
|
||||||
|
// Note that this will not have the same effect as in LaTeX export:
|
||||||
|
// There, the image will be scaled from its original size. Here, the
|
||||||
|
// percentage will be interpreted by the browser, and the image will
|
||||||
|
// be scaled to a percentage of the window size.
|
||||||
|
imgstyle = "width:" + params().scale + "%;";
|
||||||
|
}
|
||||||
if (!imgstyle.empty())
|
if (!imgstyle.empty())
|
||||||
imgstyle = "style='" + imgstyle + "' ";
|
imgstyle = "style='" + imgstyle + "' ";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user