diff options
author | B. Stack <bgstack15@gmail.com> | 2022-05-22 17:03:17 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-05-22 17:03:17 -0400 |
commit | 2c81be72eef5363736cf1892646c74a3311ee4c1 (patch) | |
tree | 3894ba7e10c78750c195381a861da5e8166a6bfd /wx+ | |
parent | Merge branch 'b11.20' into 'master' (diff) | |
download | FreeFileSync-2c81be72eef5363736cf1892646c74a3311ee4c1.tar.gz FreeFileSync-2c81be72eef5363736cf1892646c74a3311ee4c1.tar.bz2 FreeFileSync-2c81be72eef5363736cf1892646c74a3311ee4c1.zip |
add upstream 11.21b11.21
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/async_task.h | 2 | ||||
-rw-r--r-- | wx+/bitmap_button.h | 1 | ||||
-rw-r--r-- | wx+/context_menu.h | 4 | ||||
-rw-r--r-- | wx+/dc.h | 2 | ||||
-rw-r--r-- | wx+/grid.h | 2 | ||||
-rw-r--r-- | wx+/image_holder.h | 4 | ||||
-rw-r--r-- | wx+/image_resources.cpp | 3 | ||||
-rw-r--r-- | wx+/image_resources.h | 2 | ||||
-rw-r--r-- | wx+/image_tools.cpp | 2 |
9 files changed, 10 insertions, 12 deletions
diff --git a/wx+/async_task.h b/wx+/async_task.h index 1571c917..a7ce2eb5 100644 --- a/wx+/async_task.h +++ b/wx+/async_task.h @@ -84,7 +84,7 @@ public: std::vector<std::unique_ptr<Task>> readyTasks; //Reentrancy; access to AsyncTasks::add is not protected! => evaluate outside eraseIf - std::erase_if(tasks_, [&](std::unique_ptr<Task>& task) + eraseIf(tasks_, [&](std::unique_ptr<Task>& task) { if (task->resultReady()) { diff --git a/wx+/bitmap_button.h b/wx+/bitmap_button.h index 5ab5411b..32bc68c1 100644 --- a/wx+/bitmap_button.h +++ b/wx+/bitmap_button.h @@ -84,6 +84,7 @@ void setImage(wxAnyButton& button, const wxImage& img) return; } + button.SetBitmapLabel(toBitmapBundle(img)); //wxWidgets excels at screwing up consistently once again: diff --git a/wx+/context_menu.h b/wx+/context_menu.h index 728da173..ef11e37b 100644 --- a/wx+/context_menu.h +++ b/wx+/context_menu.h @@ -14,8 +14,6 @@ #include <wx/app.h> #include "dc.h" -warn_static("remove after test") -#include "image_tools.h" /* A context menu supporting lambda callbacks! @@ -102,7 +100,7 @@ private: ContextMenu& operator=(const ContextMenu&) = delete; std::unique_ptr<wxMenu> menu_ = std::make_unique<wxMenu>(); - std::map<int /*item id*/, std::function<void()> /*command*/> commandList_; + std::unordered_map<int /*item id*/, std::function<void()> /*command*/> commandList_; }; @@ -121,7 +121,7 @@ int getDpiScalePercent() inline wxBitmapBundle toBitmapBundle(const wxImage& img /*expected to be DPI-scaled!*/) { - //return wxBitmap(img, -1 /*depth*/, static_cast<double>(getDPI()) / defaultDpi); not (yet) implemented + //return wxBitmap(img, -1 /*depth*/, static_cast<double>(getDPI()) / defaultDpi); implementation just ignores scale parameter! WTF! wxBitmap bmpScaled(img); bmpScaled.SetScaleFactor(static_cast<double>(getDPI()) / defaultDpi); return bmpScaled; @@ -10,7 +10,7 @@ #include <memory> #include <numeric> #include <optional> -#include <set> +//#include <set> #include <vector> #include <zen/stl_tools.h> #include <wx/scrolwin.h> diff --git a/wx+/image_holder.h b/wx+/image_holder.h index 32f8a863..89021045 100644 --- a/wx+/image_holder.h +++ b/wx+/image_holder.h @@ -56,8 +56,8 @@ struct FileIconHolder //- what about G_IS_FILE_ICON(gicon), G_IS_LOADABLE_ICON(gicon)? => may block! => do NOT convert on main thread! (no big deal: doesn't seem to occur in practice) FileIconHolder() {}; - FileIconHolder(GIcon* gi, int maxSz) : //takes ownership! - gicon(gi), + FileIconHolder(GIcon* icon, int maxSz) : //takes ownership! + gicon(icon), maxSize(maxSz) {} struct GiconFree { void operator()(GIcon* icon) const { ::g_object_unref(icon); } }; diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index c7260c55..0301a082 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -7,13 +7,12 @@ #include "image_resources.h" #include <map> #include <zen/utf.h> -#include <zen/perf.h> +//#include <zen/perf.h> #include <zen/thread.h> #include <zen/file_io.h> #include <zen/file_traverser.h> #include <wx/zipstrm.h> #include <wx/mstream.h> -#include <wx/image.h> #include <xBRZ/src/xbrz.h> #include <xBRZ/src/xbrz_tools.h> #include "image_tools.h" diff --git a/wx+/image_resources.h b/wx+/image_resources.h index 6993e6f3..0aa4dce4 100644 --- a/wx+/image_resources.h +++ b/wx+/image_resources.h @@ -7,7 +7,7 @@ #ifndef IMAGE_RESOURCES_H_8740257825342532457 #define IMAGE_RESOURCES_H_8740257825342532457 -#include <wx/animate.h> +#include <wx/image.h> #include <zen/zstring.h> diff --git a/wx+/image_tools.cpp b/wx+/image_tools.cpp index 335cf7b9..ccbd05e2 100644 --- a/wx+/image_tools.cpp +++ b/wx+/image_tools.cpp @@ -6,7 +6,7 @@ #include "image_tools.h" #include <zen/string_tools.h> -#include <zen/zstring.h> +//#include <zen/zstring.h> #include <zen/scope_guard.h> #include <wx/app.h> #include <xBRZ/src/xbrz_tools.h> |