From 27c399adbe5dba23d6851ed5e54a7803a8d45d23 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Jan 2018 18:27:10 +0100 Subject: [PATCH] Remove wxALWAYS_SHOW_SB-related code from wxScrolled There is no need to handle this style specially here, it's supposed to be handled at wxWindow level and is, indeed, at least in all the major ports. So revert 2119b213e378d69b8d13f4c8f6012b3aa381efe9 (see #13616) and the workaround for it applied later for macOS (see #14856). And this also removes the need for handling wx[HV]SCROLL in wxScrolled (see #17846). Closes #14856, #17846. --- include/wx/scrolwin.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h index e904ed3922..029b0cb4b9 100644 --- a/include/wx/scrolwin.h +++ b/include/wx/scrolwin.h @@ -415,17 +415,7 @@ public: if ( !(style & (wxHSCROLL | wxVSCROLL)) ) style |= wxHSCROLL | wxVSCROLL; -#ifdef __WXOSX__ - bool retval = T::Create(parent, winid, pos, size, style, name); - if ( retval && (style & wxALWAYS_SHOW_SB) ) - ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS); - return retval; -#else - if ( style & wxALWAYS_SHOW_SB ) - ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS); - return T::Create(parent, winid, pos, size, style, name); -#endif } #ifdef __WXMSW__