lmi-commits
[Top][All Lists]
Advanced

[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_;
 };
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]