diff --git a/uppsrc/Draw/Draw.h b/uppsrc/Draw/Draw.h index c4e02d2a5..5af5502ad 100644 --- a/uppsrc/Draw/Draw.h +++ b/uppsrc/Draw/Draw.h @@ -205,7 +205,7 @@ public: //BW compatibility -class FontInfo { +class FontInfo { // Obsolete! Font font; friend class Font; public: diff --git a/uppsrc/ide/Template.cpp b/uppsrc/ide/Template.cpp index 1338bc082..d9e75f603 100644 --- a/uppsrc/ide/Template.cpp +++ b/uppsrc/ide/Template.cpp @@ -101,21 +101,21 @@ void AppPreview::MouseWheel(Point p, int zdelta, dword keyflags) { void AppPreview::Layout() { sb.SetTotal(line.GetCount()); - sb.SetPage(GetSize().cy / CourierZ(12).GetHeight()); + sb.SetPage(GetSize().cy / CourierZ(12).GetCy()); } void AppPreview::Paint(Draw& w) { Size sz = GetSize(); - FontInfo fi = CourierZ(12).Info(); + Font fnt = CourierZ(12); int y = 0; int i = sb; while(y < sz.cy) { bool hdr = i < line.GetCount() && line[i].header; - w.DrawRect(0, y, sz.cx, fi.GetHeight(), hdr ? LtCyan : SColorPaper); + w.DrawRect(0, y, sz.cx, fnt.GetCy(), hdr ? LtCyan : SColorPaper); if(i < line.GetCount()) - w.DrawText(0, y, line[i].text, hdr ? ArialZ(12).Bold().Italic() : CourierZ(12), SColorText); - y += fi.GetHeight(); + w.DrawText(0, y, line[i].text, hdr ? ArialZ(12).Bold().Italic() : fnt, SColorText); + y += fnt.GetCy(); i++; } } @@ -223,7 +223,6 @@ void TemplateDlg::Preview() { const PackageTemplate& tp = ActualTemplate(); ArrayMap var = MakeVars(); - int sc = preview.sb; preview.Clear(); for(int i = 0; i < tp.file.GetCount(); i++) { const FileTemplate& ft = tp.file[i]; @@ -232,7 +231,6 @@ void TemplateDlg::Preview() preview.Add(Expand(ft.text, var)); } } - preview.sb = sc; } void TemplateDlg::Create()