Fix GetSize/Width/Height calls

This commit is contained in:
Ocraftyone 2023-11-07 05:15:44 -05:00
parent cdff9ba9fa
commit 77a143a8ff
No known key found for this signature in database
GPG key ID: 85836ED21AD4D125
3 changed files with 4 additions and 4 deletions

View file

@ -1498,7 +1498,7 @@ ConfigWizardIndex::ConfigWizardIndex(wxWindow *parent)
#ifndef __WXOSX__
SetDoubleBuffered(true);// SetDoubleBuffered exists on Win and Linux/GTK, but is missing on OSX
#endif //__WXOSX__
SetMinSize(bg.bmp().GetSize());
SetMinSize(bg.GetSize());
const wxSize size = GetTextExtent("m");
em_w = size.x;

View file

@ -510,7 +510,7 @@ private:
ssize_t item_hover;
size_t last_page;
int item_height() const { return std::max(bullet_black.bmp().GetSize().GetHeight(), em_w) + em_w; }
int item_height() const { return std::max(bullet_black.GetHeight(), em_w) + em_w; }
void on_paint(wxPaintEvent &evt);
void on_mouse_move(wxMouseEvent &evt);

View file

@ -1192,7 +1192,7 @@ void Tab::msw_rescale()
bmp.msw_rescale();
// recreate and set new ImageList for tree_ctrl
m_icons->RemoveAll();
m_icons = new wxImageList(m_scaled_icons_list.front().bmp().GetWidth(), m_scaled_icons_list.front().bmp().GetHeight(), false);
m_icons = new wxImageList(m_scaled_icons_list.front().GetWidth(), m_scaled_icons_list.front().GetHeight(), false);
for (ScalableBitmap& bmp : m_scaled_icons_list)
//m_icons->Add(bmp.bmp());
m_tabctrl->AssignImageList(m_icons);
@ -1226,7 +1226,7 @@ void Tab::sys_color_changed()
bmp.msw_rescale();
// recreate and set new ImageList for tree_ctrl
m_icons->RemoveAll();
m_icons = new wxImageList(m_scaled_icons_list.front().bmp().GetWidth(), m_scaled_icons_list.front().bmp().GetHeight(), false);
m_icons = new wxImageList(m_scaled_icons_list.front().GetWidth(), m_scaled_icons_list.front().GetHeight(), false);
for (ScalableBitmap& bmp : m_scaled_icons_list)
//m_icons->Add(bmp.bmp());
m_tabctrl->AssignImageList(m_icons);