diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
commit | 460091fb0b2ff114cc741372f15bb43b702ea3b1 (patch) | |
tree | 0562c2eda4c66969c6e6d0910080db9f5b0def3e /wx+ | |
parent | 5.15 (diff) | |
download | FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.gz FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.bz2 FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.zip |
5.16
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; |