mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Use font metrics for computing the size of math decorations
It was an error using an absolute size instead of one relative to the size of the used font. It was requiring using the physical dpi of the screen and caused #12222. Now everything is computed with respect to the metrics of the font and should be automatically correct. Fixes #12222.
This commit is contained in:
parent
9d1031771e
commit
7a6ad48495
@ -1141,7 +1141,7 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
|
||||
|
||||
// needs to be done before reading lyxrc
|
||||
QWidget w;
|
||||
lyxrc.dpi = (w.physicalDpiX() + w.physicalDpiY()) / 2;
|
||||
lyxrc.dpi = (w.logicalDpiX() + w.logicalDpiY()) / 2;
|
||||
|
||||
guiApp = this;
|
||||
|
||||
|
@ -122,8 +122,8 @@ void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
cell(0).metrics(mi, dim);
|
||||
|
||||
int const l1 = mi.base.bv->zoomedPixels(1);
|
||||
int const l2 = 4 * l1;
|
||||
int const l3 = 4 * l1;
|
||||
int const l2 = mathed_char_width(mi.base.font, 'x') - l1;
|
||||
int const l3 = l2;
|
||||
|
||||
dh_ = l2; //mathed_char_height(LM_TC_VAR, mi, 'I', ascent_, descent_);
|
||||
dw_ = l3; //mathed_char_width(LM_TC_VAR, mi, 'x');
|
||||
|
Loading…
Reference in New Issue
Block a user