From c60ba92d097bd49e204f140f22ade84a1b6bc38c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 15 Feb 2002 19:40:51 +0000 Subject: [PATCH] don't show size grip when maximized git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/statusbr.cpp | 6 +++++- src/univ/themes/win32.cpp | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/univ/statusbr.cpp b/src/univ/statusbr.cpp index 143b6fcde8..a4a98d952d 100644 --- a/src/univ/statusbr.cpp +++ b/src/univ/statusbr.cpp @@ -35,6 +35,7 @@ #endif #include "wx/statusbr.h" +#include "wx/toplevel.h" #include "wx/univ/renderer.h" @@ -122,12 +123,15 @@ void wxStatusBarUniv::DoDraw(wxControlRenderer *renderer) if ( IsExposed(rect) ) { + wxTopLevelWindow *parentTLW = wxDynamicCast(GetParent(), wxTopLevelWindow); + // the size grip may be drawn only on the last field and only if we // have the corresponding style and even then only if we really can // resize this frame if ( n == m_nFields - 1 && HasFlag(wxST_SIZEGRIP) && - GetParent()->HasFlag(wxRESIZE_BORDER) ) + GetParent()->HasFlag(wxRESIZE_BORDER) && + parentTLW && !parentTLW->IsMaximized() ) { // NB: we use wxCONTROL_ISDEFAULT for this because it doesn't // have any meaning for the status bar otherwise anyhow diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index b7d8482bb1..e30f0b3ec0 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -4204,8 +4204,11 @@ wxWin32StatusBarInputHandler(wxInputHandler *handler) bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar, const wxPoint& pt) const { + wxTopLevelWindow *parentTLW = wxDynamicCast(statbar->GetParent(), wxTopLevelWindow); + if ( statbar->HasFlag(wxST_SIZEGRIP) && - statbar->GetParent()->HasFlag(wxRESIZE_BORDER) ) + statbar->GetParent()->HasFlag(wxRESIZE_BORDER) && + parentTLW && !parentTLW->IsMaximized() ) { wxSize sizeSbar = statbar->GetSize(); -- 2.45.2