mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-02 14:56:56 +00:00
FIX: GTK video window resize ran in a free function without member access
wxMediaCtrl_OnSize referenced wxMediaCtrl2's private m_gtk_video_window, which does not compile on Linux/GTK. Move the resizing into wxMediaCtrl2::DoSetSize where the member is in scope.
This commit is contained in:
@@ -828,12 +828,6 @@ bool MediaPlayCtrl::get_stream_url(std::string *url)
|
||||
|
||||
void wxMediaCtrl_OnSize(wxWindow * ctrl, wxSize const & videoSize, int width, int height)
|
||||
{
|
||||
#if defined(__LINUX__) && defined(__WXGTK__)
|
||||
if (m_gtk_video_window) {
|
||||
const wxSize client_size = GetClientSize();
|
||||
m_gtk_video_window->SetSize(0, 0, client_size.GetWidth(), client_size.GetHeight());
|
||||
}
|
||||
#endif
|
||||
wxSize size = videoSize;
|
||||
if (!size.IsFullySpecified()) size = {16, 9};
|
||||
int maxHeight = (width * size.GetHeight() + size.GetHeight() - 1) / size.GetWidth();
|
||||
|
||||
Reference in New Issue
Block a user