mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-31 07:12:39 -06:00
git-svn-id: svn://ultimatepp.org/upp/trunk@9188 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
647e44acfa
commit
bae8be24bc
2 changed files with 6 additions and 8 deletions
|
|
@ -205,7 +205,7 @@ public:
|
|||
|
||||
|
||||
//BW compatibility
|
||||
class FontInfo {
|
||||
class FontInfo { // Obsolete!
|
||||
Font font;
|
||||
friend class Font;
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -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<String, EscValue> 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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue