Skip to content

Commit

Permalink
rename VirtWnd::Draw() => Paint()
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Aug 13, 2024
1 parent a354c0d commit 738b466
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/HomePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static Rect DrawHideFrequentlyReadLink(HWND hwnd, HDC hdc, const char* txt) {
PositionRB(rc, r);
MoveXY(r, -innerPadding, -innerPadding);
w.SetBounds(r);
w.Draw(hdc);
w.Paint(hdc);

// make the click target larger
r.Inflate(innerPadding, innerPadding);
Expand Down Expand Up @@ -867,7 +867,7 @@ static void DrawHomePageLayout(const HomePageLayout& l) {
color = ThemeWindowTextColor();
SetTextColor(hdc, color);

l.freqRead->Draw(hdc);
l.freqRead->Paint(hdc);
SelectObject(hdc, GetStockBrush(NULL_BRUSH));

for (const ThumbnailLayout& thumb : l.thumbnails) {
Expand Down Expand Up @@ -913,7 +913,7 @@ static void DrawHomePageLayout(const HomePageLayout& l) {
int openIconIdx = 0;
ImageList_Draw(l.himlOpen, openIconIdx, hdc, x, y, ILD_NORMAL);

l.openDoc->Draw(hdc);
l.openDoc->Paint(hdc);

if (false) {
Rect rcFreqRead = DrawHideFrequentlyReadLink(win->hwndCanvas, hdc, _TRA("Hide frequently read"));
Expand Down
2 changes: 1 addition & 1 deletion src/wingui/VirtWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Size VirtWndText::GetIdealSize(bool onlyIfEmpty) {
return sz;
}

void VirtWndText::Draw(HDC hdc) {
void VirtWndText::Paint(HDC hdc) {
ReportIf(lastBounds.IsEmpty());
COLORREF prevCol = kColorUnset;
int prevBkMode = 0;
Expand Down
5 changes: 3 additions & 2 deletions src/wingui/VirtWnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct VirtWnd : LayoutBase {

virtual Size GetIdealSize();

void Paint(HDC);
virtual void Paint(HDC);

VirtWnd* next = nullptr;
VirtWnd* firstChild = nullptr;
Expand Down Expand Up @@ -46,5 +46,6 @@ struct VirtWndText : VirtWnd {

Size MinIntrinsicSize(int width, int height);
Size GetIdealSize(bool onlyIfEmpty = false);
void Draw(HDC dc);

void Paint(HDC dc) override;
};

0 comments on commit 738b466

Please sign in to comment.