[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c094807 05/46: Remove unnecessary altColor_ m
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c094807 05/46: Remove unnecessary altColor_ member variable |
Date: |
Wed, 22 Jul 2020 11:05:09 -0400 (EDT) |
branch: master
commit c0948070bd5b4c261d87840b8f1f784a5458e21f
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Vadim Zeitlin <vadim@tt-solutions.com>
Remove unnecessary altColor_ member variable
This colour is stored inside attrForOddRows_ anyhow, and we can just use
it instead.
No real changes.
---
census_view.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/census_view.cpp b/census_view.cpp
index a3334b0..bf69eb4 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -1556,9 +1556,8 @@ class CensusViewGridCellAttrProvider
// Depending on the background, alternate row color
// will be 3% more dark or 50% brighter.
int const alpha = bgColor.GetRGB() > 0x808080 ? 97 : 150;
- altColor_ = bgColor.ChangeLightness(alpha);
- attrForOddRows_->SetBackgroundColour(altColor_);
+ attrForOddRows_->SetBackgroundColour(bgColor.ChangeLightness(alpha));
}
wxGridCellAttr* GetAttr
@@ -1583,7 +1582,9 @@ class CensusViewGridCellAttrProvider
wxGridCellAttr* attrNew = attr->Clone();
attr->DecRef();
attr = attrNew;
- attr->SetBackgroundColour(altColor_);
+ attr->SetBackgroundColour
+ (attrForOddRows_->GetBackgroundColour()
+ );
}
}
}
@@ -1592,7 +1593,6 @@ class CensusViewGridCellAttrProvider
}
private:
- wxColor altColor_;
wxObjectDataPtr<wxGridCellAttr> attrForOddRows_;
};
- [lmi-commits] [lmi] master updated (6977670 -> 713d56f), Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 14ac975 03/46: Use at() instead of operator[] in non-performance-critical code, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 193e804 01/46: Refactor census view to enable several implementations, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master c094807 05/46: Remove unnecessary altColor_ member variable,
Greg Chicares <=
- [lmi-commits] [lmi] master 3d86a92 06/46: Use simpler wxGrid::AssignTable(), Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master c9e743f 08/46: Remove extra blank line from census_view.hpp, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master ba15191 11/46: Stop using wxRTTI in DatumSequenceEditorEvtHandler, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 5ee4b04 13/46: Improve comments in DatumSequenceEditorEvtHandler, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 03d33ab 14/46: Make DatumSequenceEditorEvtHandler::entry_ const, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 0e2a694 16/46: Replace DatumSequenceEditorEvtHandler with a lambda, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 3e9f8af 02/46: Add census_view variant with wxGrid, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 804111d 04/46: Remove unnecessary use of std::swap(), Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 25a989e 10/46: Make table_type_converter::get_all() map const, Greg Chicares, 2020/07/22
- [lmi-commits] [lmi] master 12940dc 09/46: Define static map in more compact way, Greg Chicares, 2020/07/22