diff options
author | B. Stack <bgstack15@gmail.com> | 2022-10-19 10:53:07 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-10-19 10:53:07 -0400 |
commit | a53560254596460a4778a27f50b89ce92f810055 (patch) | |
tree | 551fdc08cbece3cca567d04870b91eaa115a4675 /wx+/grid.cpp | |
parent | Merge branch 'b11.26' into 'master' (diff) | |
download | FreeFileSync-a53560254596460a4778a27f50b89ce92f810055.tar.gz FreeFileSync-a53560254596460a4778a27f50b89ce92f810055.tar.bz2 FreeFileSync-a53560254596460a4778a27f50b89ce92f810055.zip |
add upstream 11.2711.27
Diffstat (limited to 'wx+/grid.cpp')
-rw-r--r-- | wx+/grid.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/wx+/grid.cpp b/wx+/grid.cpp index 5d2adc1a..0ffee3a7 100644 --- a/wx+/grid.cpp +++ b/wx+/grid.cpp @@ -615,12 +615,11 @@ private: class Grid::ColLabelWin : public SubWindow { public: - explicit ColLabelWin(Grid& parent) : SubWindow(parent) + explicit ColLabelWin(Grid& parent) : SubWindow(parent), + labelFont_(GetFont().Bold()) { //coordinate with ColLabelWin::render(): - wxFont labelFont = GetFont(); - labelFont.MakeBold(); - colLabelHeight_ = fastFromDIP(2 * DEFAULT_COL_LABEL_BORDER_DIP) + labelFont.GetPixelSize().GetHeight(); + colLabelHeight_ = fastFromDIP(2 * DEFAULT_COL_LABEL_BORDER_DIP) + labelFont_.GetPixelSize().GetHeight(); } int getColumnLabelHeight() const { return colLabelHeight_; } @@ -637,9 +636,7 @@ private: const bool enabled = renderAsEnabled(*this); //coordinate with "colLabelHeight" in Grid constructor: - wxFont labelFont = GetFont(); - labelFont.MakeBold(); - dc.SetFont(labelFont); + dc.SetFont(labelFont_); wxDCTextColourChanger textColor(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); //use user setting for labels @@ -944,6 +941,7 @@ private: bool freezeMouseHighlight_ = false; int colLabelHeight_ = 0; + const wxFont labelFont_; }; //---------------------------------------------------------------------------------------------------------------- |