Skip to content

Commit

Permalink
* Fix status bar custom drawn text always black
Browse files Browse the repository at this point in the history
  • Loading branch information
iProgramMC committed Jun 4, 2024
1 parent 588b905 commit 14f1bfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/windows/StatusBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ void StatusBar::DrawItem(LPDRAWITEMSTRUCT lpDIS)

int mode = SetBkMode(hdc, TRANSPARENT);
HGDIOBJ gdiObjOld = SelectObject(hdc, g_TypingBoldFont);
COLORREF textOld = SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT));

m_typing_status_rect = rc;

Expand Down Expand Up @@ -253,6 +254,7 @@ void StatusBar::DrawItem(LPDRAWITEMSTRUCT lpDIS)
DrawText(hdc, typingEnd, -1, &rc, DT_WORD_ELLIPSIS | DT_NOPREFIX | DT_VCENTER | DT_SINGLELINE);
}

SetTextColor(hdc, textOld);
SelectObject(hdc, gdiObjOld);
SetBkMode(lpDIS->hDC, mode);
}
Expand Down

0 comments on commit 14f1bfc

Please sign in to comment.