mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-12 11:37:42 +00:00
FIX: TabCtrl button margin
Change-Id: If8b05a4ef9efb8b57989ee1de6543631e5a3cf90 Jira: STUDIO-8265 (cherry picked from commit 1c5e65707109ad0582b6442cf8e515344f799c27)
This commit is contained in:
@@ -111,7 +111,7 @@ int TabCtrl::AppendItem(const wxString &item,
|
|||||||
btns.push_back(btn);
|
btns.push_back(btn);
|
||||||
if (btns.size() > 1)
|
if (btns.size() > 1)
|
||||||
sizer->GetItem(sizer->GetItemCount() - 1)->SetMinSize({0, 0});
|
sizer->GetItem(sizer->GetItemCount() - 1)->SetMinSize({0, 0});
|
||||||
sizer->Add(btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, TAB_BUTTON_SPACE * 2);
|
sizer->Add(btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, TAB_BUTTON_SPACE);
|
||||||
sizer->AddStretchSpacer(1);
|
sizer->AddStretchSpacer(1);
|
||||||
relayout();
|
relayout();
|
||||||
return btns.size() - 1;
|
return btns.size() - 1;
|
||||||
@@ -225,8 +225,9 @@ bool TabCtrl::IsVisible(unsigned int item) const
|
|||||||
|
|
||||||
void TabCtrl::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
void TabCtrl::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||||
{
|
{
|
||||||
|
auto size = GetSize();
|
||||||
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
|
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
|
||||||
if (sizeFlags & wxSIZE_USE_EXISTING) return;
|
if (size == GetSize()) return;
|
||||||
relayout();
|
relayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ void wxMediaCtrl3::paintEvent(wxPaintEvent &evt)
|
|||||||
void wxMediaCtrl3::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
void wxMediaCtrl3::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||||
{
|
{
|
||||||
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
|
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
|
||||||
if (sizeFlags & wxSIZE_USE_EXISTING) return;
|
if (sizeFlags == wxSIZE_USE_EXISTING) return;
|
||||||
wxMediaCtrl_OnSize(this, m_video_size, width, height);
|
wxMediaCtrl_OnSize(this, m_video_size, width, height);
|
||||||
std::unique_lock<std::mutex> lk(m_mutex);
|
std::unique_lock<std::mutex> lk(m_mutex);
|
||||||
adjust_frame_size(m_frame_size, m_video_size, GetSize());
|
adjust_frame_size(m_frame_size, m_video_size, GetSize());
|
||||||
|
|||||||
Reference in New Issue
Block a user