mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
Draw, CtrlLib, ide: Fixed problem with GetAveWidth being unreliable
git-svn-id: svn://ultimatepp.org/upp/trunk@15842 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c19b5b1421
commit
95fb7897ec
5 changed files with 24 additions and 11 deletions
|
|
@ -391,12 +391,10 @@ void TextCompareCtrl::SetFont(Font f, Font nf)
|
|||
{
|
||||
font = f;
|
||||
number_font = nf;
|
||||
FontInfo fi = f.Info();
|
||||
FontInfo ni = nf.Info();
|
||||
letter.cy = fi.GetHeight();
|
||||
letter.cx = fi.GetAveWidth();
|
||||
number_width = 5 * ni.GetAveWidth();
|
||||
number_yshift = (fi.GetHeight() - ni.GetHeight() + 2) >> 1;
|
||||
letter.cy = f.GetHeight();
|
||||
letter.cx = f.GetMonoWidth();
|
||||
number_width = 5 * nf.GetMonoWidth();
|
||||
number_yshift = (f.GetHeight() - nf.GetHeight() + 2) >> 1;
|
||||
Layout();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue