]> git.saurik.com Git - wxWidgets.git/commitdiff
don't show size grip when maximized
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 15 Feb 2002 19:40:51 +0000 (19:40 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 15 Feb 2002 19:40:51 +0000 (19:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/statusbr.cpp
src/univ/themes/win32.cpp

index 143b6fcde885b2e9967c2dfa01ebdad0bdaec5ca..a4a98d952dd7d88a01419895a25cb1bacbabd834 100644 (file)
@@ -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
index b7d8482bb124047bfd5709171f9a2f6503cc8424..e30f0b3ec0c2287a6908134585834688c3e3f0f4 100644 (file)
@@ -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();