From 595e7599de982e42eec0f2cbdf14c0cabf81d99c Mon Sep 17 00:00:00 2001 From: unodgs Date: Mon, 25 Jul 2011 15:38:50 +0000 Subject: [PATCH] GridCtrl: Fixed painting columns with null header font git-svn-id: svn://ultimatepp.org/upp/trunk@3712 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/GridCtrl/GridCtrl.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/uppsrc/GridCtrl/GridCtrl.cpp b/uppsrc/GridCtrl/GridCtrl.cpp index ee79831c5..02e73e033 100644 --- a/uppsrc/GridCtrl/GridCtrl.cpp +++ b/uppsrc/GridCtrl/GridCtrl.cpp @@ -1175,7 +1175,7 @@ void GridCtrl::Paint(Draw &w) gd->SetLeftImage(hi.img); gd->PaintFixed(w, jj == firstcol, i == 0, x, y, cx, cy, i == 0 ? it.val : GetConvertedColumn(hi.id, it.val), - style | en, hi.hfnt, false, false, + style | en, IsNull(hi.hfnt) ? StdFont() : hi.hfnt, false, false, i == 0 ? hi.sortmode : 0, hi.sortcol, sortOrder.GetCount(), @@ -1303,7 +1303,7 @@ void GridCtrl::Paint(Draw &w) gd->PaintFixed(w, firstx, j == 0, x, y, cx, cy, GetConvertedColumn(id, it.val), - style | en, vi.hfnt, + style | en, IsNull(vi.hfnt) ? StdFont() : vi.hfnt, indicator, false, 0, -1, 0, false); it.rcx = gd->real_size.cx; @@ -1359,14 +1359,7 @@ void GridCtrl::Paint(Draw &w) if(x < sz.cx) w.DrawRect(Rect(max(x, rc.left), max(fixed_height, rc.top), sz.cx, sz.cy), SColorPaper); if(y < sz.cy) w.DrawRect(Rect(max(fixed_width, rc.left), max(y, rc.top), sz.cx, sz.cy), SColorPaper); -/* - if(fixed_rows <= total_rows) - { - w.DrawText( - } -*/ - - bool hasfocus = HasFocus/*Deep*/() || holder.HasFocusDeep(); + bool hasfocus = HasFocus() || holder.HasFocusDeep(); for(i = max(firstRow, fixed_rows); i < total_rows; i++) {