diff options
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/create_pch.cpp | 2 | ||||
-rw-r--r-- | wx+/grid.cpp | 2 | ||||
-rw-r--r-- | wx+/image_tools.h | 2 | ||||
-rw-r--r-- | wx+/toggle_button.h | 8 |
4 files changed, 6 insertions, 8 deletions
diff --git a/wx+/create_pch.cpp b/wx+/create_pch.cpp index ad4cabd9..be54115f 100644 --- a/wx+/create_pch.cpp +++ b/wx+/create_pch.cpp @@ -5,4 +5,4 @@ // ************************************************************************** //dummy file for Visual Studio to compile precompiled header: -//attaching pch to any other cpp file triggers a full rebuild each time code is changed!
\ No newline at end of file +//associating pch with any other cpp file will trigger a full pch rebuild each time code is changed!
\ No newline at end of file diff --git a/wx+/grid.cpp b/wx+/grid.cpp index 67d01fef..a0af0671 100644 --- a/wx+/grid.cpp +++ b/wx+/grid.cpp @@ -1332,7 +1332,7 @@ private: double deltaTime = 0; if (ticksPerSec_ > 0) { - const TickVal now = getTicks(); //0 on error + const TickVal now = getTicks(); //isValid() on error deltaTime = static_cast<double>(dist(tickCountLast, now)) / ticksPerSec_; //unit: [sec] tickCountLast = now; } diff --git a/wx+/image_tools.h b/wx+/image_tools.h index 9de93c26..ec9e34d4 100644 --- a/wx+/image_tools.h +++ b/wx+/image_tools.h @@ -54,6 +54,8 @@ void move(wxImage& img, int up, int left) inline wxBitmap greyScale(const wxBitmap& bmp) { + assert(!bmp.GetMask()); //wxWidgets screws up for the gazillionth time applying a mask instead of alpha channel if the .png image has only 0 and 0xff opacity values!!! + wxImage output = bmp.ConvertToImage().ConvertToGreyscale(1.0 / 3, 1.0 / 3, 1.0 / 3); //treat all channels equally! //wxImage output = bmp.ConvertToImage().ConvertToGreyscale(); adjustBrightness(output, 160); diff --git a/wx+/toggle_button.h b/wx+/toggle_button.h index 548def1d..858082d3 100644 --- a/wx+/toggle_button.h +++ b/wx+/toggle_button.h @@ -27,8 +27,7 @@ public: } void init(const wxBitmap& activeBmp, - const wxBitmap& inactiveBmp, - const wxString& tooltip); + const wxBitmap& inactiveBmp); void setActive(bool value); bool isActive() const { return active; } @@ -56,11 +55,8 @@ private: //######################## implementation ######################## inline void ToggleButton::init(const wxBitmap& activeBmp, - const wxBitmap& inactiveBmp, - const wxString& tooltip) + const wxBitmap& inactiveBmp) { - SetToolTip(tooltip); - activeBmp_ = activeBmp; inactiveBmp_ = inactiveBmp; |