From dc062f1a1a556276091f772300968c4932563cdc Mon Sep 17 00:00:00 2001 From: Ocraftyone Date: Tue, 7 Nov 2023 06:03:55 -0500 Subject: [PATCH] update my todos to OcraftyoneTODO --- src/slic3r/GUI/BitmapCache.cpp | 2 +- src/slic3r/GUI/wxExtensions.cpp | 24 ++++++++++++------------ src/slic3r/GUI/wxExtensions.hpp | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp index 5914747b92..cfd027dbc8 100644 --- a/src/slic3r/GUI/BitmapCache.cpp +++ b/src/slic3r/GUI/BitmapCache.cpp @@ -781,7 +781,7 @@ wxBitmapBundle* BitmapCache::mksolid_bndl(size_t width, size_t height, const std if (color.empty()) bndl = new wxBitmapBundle(mksolid(width, height, 0, 0, 0, wxALPHA_TRANSPARENT, size_t(0))); else { - //TODO: replace with ColorRGB class + //OcraftyoneTODO: replace with ColorRGB class // ColorRGB rgb;// [3] // decode_color(color, rgb); unsigned char rgb[3]; diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 934d271b21..a76d2d84bd 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -22,7 +22,7 @@ #ifndef __linux__ // msw_menuitem_bitmaps is used for MSW and OSX static std::map msw_menuitem_bitmaps; -void msw_rescale_menu(wxMenu* menu) //TODO: PS RENAME (sys_color_changed_menu) +void msw_rescale_menu(wxMenu* menu) //OcraftyoneTODO: PS RENAME (sys_color_changed_menu) { struct update_icons { static void run(wxMenuItem* item) { @@ -829,7 +829,7 @@ void ModeSizer::set_items_border(int border) void ModeSizer::msw_rescale() { -// this->SetHGap(std::lround(m_hgap_unscaled * em_unit(m_parent))); //TODO: LEGACY (PS removed) +// this->SetHGap(std::lround(m_hgap_unscaled * em_unit(m_parent))); //OcraftyoneTODO: LEGACY (PS removed) for (size_t m = 0; m < m_mode_btns.size(); m++) m_mode_btns[m]->msw_rescale(); } @@ -879,13 +879,13 @@ ScalableBitmap::ScalableBitmap( wxWindow *parent, if (height != GetBmpHeight()) msw_rescale(); } - //TODO: PS replaces this function body with the following code + //OcraftyoneTODO: PS replaces this function body with the following code // m_bmp = *get_bmp_bundle(icon_name, px_cnt); // m_bitmap = m_bmp.GetBitmapFor(parent); } -//TODO: Remove the following 3 functions when refactor complete +//OcraftyoneTODO: Remove the following 3 functions when refactor complete wxSize ScalableBitmap::GetBmpSize() const { return GetSize(); } @@ -900,7 +900,7 @@ void ScalableBitmap::msw_rescale() { // BBS: support resize by fill border m_bmp = create_scaled_bitmap(m_icon_name, m_parent, m_px_cnt, m_grayscale, std::string(), false, m_resize); -// m_bmp = *get_bmp_bundle(m_icon_name, m_px_cnt); // TODO: can this impl be used +// m_bmp = *get_bmp_bundle(m_icon_name, m_px_cnt); // OcraftyoneTODO: can this impl be used } // ---------------------------------------------------------------------------- @@ -914,11 +914,11 @@ ScalableButton::ScalableButton( wxWindow * parent, const wxSize& size /* = wxDefaultSize*/, const wxPoint& pos /* = wxDefaultPosition*/, long style /*= wxBU_EXACTFIT | wxNO_BORDER*/, - bool use_default_disabled_bitmap/* = false*/, //TODO: removed by ps + bool use_default_disabled_bitmap/* = false*/, //OcraftyoneTODO: removed by ps int bmp_px_cnt/* = 16*/) : m_parent(parent), m_current_icon_name(icon_name), - m_use_default_disabled_bitmap (use_default_disabled_bitmap), //TODO: removed by ps + m_use_default_disabled_bitmap (use_default_disabled_bitmap), //OcraftyoneTODO: removed by ps m_px_cnt(bmp_px_cnt), m_has_border(!(style & wxNO_BORDER)) { @@ -930,7 +930,7 @@ ScalableButton::ScalableButton( wxWindow * parent, SetBitmap(create_scaled_bitmap(icon_name, parent, m_px_cnt)); if (m_use_default_disabled_bitmap) SetBitmapDisabled(create_scaled_bitmap(m_current_icon_name, m_parent, m_px_cnt, true)); - //TODO: replace above 3 lines with following + //OcraftyoneTODO: replace above 3 lines with following // SetBitmap(*get_bmp_bundle(icon_name, m_px_cnt)); if (!label.empty()) SetBitmapMargins(int(0.5* em_unit(parent)), 0); @@ -980,7 +980,7 @@ bool ScalableButton::SetBitmap_(const std::string& bmp_name) SetBitmapFocus(bmp); if (m_use_default_disabled_bitmap) SetBitmapDisabled(create_scaled_bitmap(m_current_icon_name, m_parent, m_px_cnt, true)); - //TODO: above 2 lines replaced with + //OcraftyoneTODO: above 2 lines replaced with // SetBitmapDisabled(bmp); return true; } @@ -1000,13 +1000,13 @@ int ScalableButton::GetBitmapHeight() #endif } -void ScalableButton::UseDefaultBitmapDisabled() //TODO: removed by ps +void ScalableButton::UseDefaultBitmapDisabled() //OcraftyoneTODO: removed by ps { m_use_default_disabled_bitmap = true; SetBitmapDisabled(create_scaled_bitmap(m_current_icon_name, m_parent, m_px_cnt, true)); } -void ScalableButton::msw_rescale() //TODO: renamed to sys_color_changed +void ScalableButton::msw_rescale() //OcraftyoneTODO: renamed to sys_color_changed { Slic3r::GUI::wxGetApp().UpdateDarkUI(this, m_has_border); @@ -1032,7 +1032,7 @@ BlinkingBitmap::BlinkingBitmap(wxWindow* parent, const std::string& icon_name) : bmp = ScalableBitmap(parent, icon_name); } -void BlinkingBitmap::msw_rescale() //TODO: removed by ps +void BlinkingBitmap::msw_rescale() //OcraftyoneTODO: removed by ps { bmp.msw_rescale(); this->SetSize(bmp.GetBmpSize()); diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp index 5d34c9c6c3..8eadea55f3 100644 --- a/src/slic3r/GUI/wxExtensions.hpp +++ b/src/slic3r/GUI/wxExtensions.hpp @@ -19,9 +19,9 @@ #include "Widgets/PopupWindow.hpp" #ifndef __linux__ -void msw_rescale_menu(wxMenu* menu); //TODO: PS RENAME (sys_color_changed_menu) +void msw_rescale_menu(wxMenu* menu); //OcraftyoneTODO: PS RENAME (sys_color_changed_menu) #else -inline void msw_rescale_menu(wxMenu* /* menu */) {} //TODO: PS RENAME (sys_color_changed_menu) +inline void msw_rescale_menu(wxMenu* /* menu */) {} //OcraftyoneTODO: PS RENAME (sys_color_changed_menu) #endif // no __linux__ wxMenuItem* append_menu_item(wxMenu* menu, int id, const wxString& string, const wxString& description, @@ -52,7 +52,7 @@ void msw_buttons_rescale(wxDialog* dlg, const int em_unit, const std::vector< int em_unit(wxWindow* win); int mode_icon_px_size(); -wxBitmap create_menu_bitmap(const std::string& bmp_name); //TODO: LEGACY (PS deleted) +wxBitmap create_menu_bitmap(const std::string& bmp_name); //OcraftyoneTODO: LEGACY (PS deleted) wxBitmapBundle* get_bmp_bundle(const std::string& bmp_name, int px_cnt = 16); wxBitmapBundle* get_empty_bmp_bundle(int width, int height); wxBitmapBundle* get_solid_bmp_bundle(int width, int height, const std::string& color); @@ -171,11 +171,11 @@ public: ~ScalableBitmap() {} - wxSize GetBmpSize() const; // TODO: REPLACE + wxSize GetBmpSize() const; // OcraftyoneTODO: REPLACE int GetBmpWidth() const; int GetBmpHeight() const; - void msw_rescale(); //TODO: PS RENAME (sys_color_changed) + void msw_rescale(); //OcraftyoneTODO: PS RENAME (sys_color_changed) const wxBitmapBundle& bmp() const { return m_bmp; } wxBitmapBundle& bmp() { return m_bmp; } @@ -184,7 +184,7 @@ public: const std::string& name() const{ return m_icon_name; } int px_cnt() const { return m_px_cnt; } - wxSize GetSize() const { // TODO: REPLACEMENTS + wxSize GetSize() const { // OcraftyoneTODO: REPLACEMENTS #ifdef __APPLE__ return m_bmp.GetDefaultSize(); #else @@ -228,7 +228,7 @@ public: void enable() { m_disabled = false; } void disable() { m_disabled = true; } - void msw_rescale(); //TODO: PS RENAME (sys_color_changed) + void msw_rescale(); //OcraftyoneTODO: PS RENAME (sys_color_changed) protected: void update_button_bitmaps(); @@ -260,7 +260,7 @@ public: const wxSize& size = wxDefaultSize, const wxPoint& pos = wxDefaultPosition, long style = wxBU_EXACTFIT | wxNO_BORDER, - bool use_default_disabled_bitmap = false, //TODO: LEGACY (PS deleted) + bool use_default_disabled_bitmap = false, //OcraftyoneTODO: LEGACY (PS deleted) int bmp_px_cnt = 16); ScalableButton( @@ -276,7 +276,7 @@ public: bool SetBitmap_(const std::string& bmp_name); void SetBitmapDisabled_(const ScalableBitmap &bmp); int GetBitmapHeight(); - void UseDefaultBitmapDisabled(); //TODO: LEGACY (PS deleted) + void UseDefaultBitmapDisabled(); //OcraftyoneTODO: LEGACY (PS deleted) void msw_rescale(); @@ -287,7 +287,7 @@ private: int m_width {-1}; // should be multiplied to em_unit int m_height{-1}; // should be multiplied to em_unit - bool m_use_default_disabled_bitmap {false}; //TODO: LEGACY (PS deleted) + bool m_use_default_disabled_bitmap {false}; //OcraftyoneTODO: LEGACY (PS deleted) // bitmap dimensions int m_px_cnt{ 16 }; @@ -354,7 +354,7 @@ public: void set_items_flag(int flag); void set_items_border(int border); - void msw_rescale(); //TODO: PS RENAME (sys_color_changed) + void msw_rescale(); //OcraftyoneTODO: PS RENAME (sys_color_changed) const std::vector& get_btns() { return m_mode_btns; } private: @@ -402,7 +402,7 @@ public: ~BlinkingBitmap() {} - void msw_rescale(); //TODO: LEGACY (PS deleted) + void msw_rescale(); //OcraftyoneTODO: LEGACY (PS deleted) void invalidate(); void activate(); void blink();