]> git.saurik.com Git - wxWidgets.git/commitdiff
Aqua splitter sashes.
authorRobert Roebling <robert@roebling.de>
Tue, 4 Dec 2001 21:08:50 +0000 (21:08 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 4 Dec 2001 21:08:50 +0000 (21:08 +0000)
Even bigger notebook for Aqua.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/nbkbase.cpp
src/generic/splitter.cpp

index 29a24d0a8b69e7a9e5d98b600b8b50745b46a8b4..ccc78efd571a3f26b6bb13e006704ebde51a7ffd 100644 (file)
@@ -98,7 +98,7 @@ wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage)
     {
         sizeTotal.x += 90;
 #ifdef __WXMAC__
     {
         sizeTotal.x += 90;
 #ifdef __WXMAC__
-        sizeTotal.y += 20;
+        sizeTotal.y += 28;
 #else
         sizeTotal.y += 10;
 #endif
 #else
         sizeTotal.y += 10;
 #endif
@@ -106,11 +106,12 @@ wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage)
     else
     {
 #ifdef __WXMAC__
     else
     {
 #ifdef __WXMAC__
-        sizeTotal.x += 32;   // This is OK for Aqua.
+        sizeTotal.x += 34;   // This is OK for Aqua.
+        sizeTotal.y += 46;
 #else
         sizeTotal.x += 10;
 #else
         sizeTotal.x += 10;
-#endif
         sizeTotal.y += 40;
         sizeTotal.y += 40;
+#endif
     }
 
     return sizeTotal;
     }
 
     return sizeTotal;
index dc50eb3590c1893f55157e472b0b811deba95712..65fc2e4f3038dbf6475667bafe77c271a95abcf0 100644 (file)
@@ -508,7 +508,12 @@ void wxSplitterWindow::DrawSash(wxDC& dc)
         if ( m_splitMode == wxSPLIT_VERTICAL )
         {
             dc.SetPen(*m_facePen);
         if ( m_splitMode == wxSPLIT_VERTICAL )
         {
             dc.SetPen(*m_facePen);
+            // How to test for Aqua?
+#ifdef __DARWIN__
+            dc.SetBrush(*wxWHITE_BRUSH);
+#else
             dc.SetBrush(*m_faceBrush);
             dc.SetBrush(*m_faceBrush);
+#endif
             dc.DrawRectangle(m_sashPosition + 2, 0 , m_sashSize - 4, h );
 
             dc.SetBrush(*wxTRANSPARENT_BRUSH);
             dc.DrawRectangle(m_sashPosition + 2, 0 , m_sashSize - 4, h );
 
             dc.SetBrush(*wxTRANSPARENT_BRUSH);
@@ -520,13 +525,19 @@ void wxSplitterWindow::DrawSash(wxDC& dc)
             dc.SetPen(*m_hilightPen);
             dc.DrawLine(m_sashPosition+1, m_borderSize - 2, m_sashPosition+1, h - m_borderSize+2);
 
             dc.SetPen(*m_hilightPen);
             dc.DrawLine(m_sashPosition+1, m_borderSize - 2, m_sashPosition+1, h - m_borderSize+2);
 
+#ifndef __DARWIN__
             dc.SetPen(*m_mediumShadowPen);
             dc.SetPen(*m_mediumShadowPen);
+#endif
                         int yMedium = m_borderSize ? h-m_borderSize+1 : h ;
             dc.DrawLine(m_sashPosition+m_sashSize-2, xShadow, m_sashPosition+m_sashSize-2, yMedium);
 
                         int yMedium = m_borderSize ? h-m_borderSize+1 : h ;
             dc.DrawLine(m_sashPosition+m_sashSize-2, xShadow, m_sashPosition+m_sashSize-2, yMedium);
 
+#ifdef __DARWIN__
+            dc.SetPen(*m_lightShadowPen);
+#else
             dc.SetPen(*m_darkShadowPen);
             dc.SetPen(*m_darkShadowPen);
+#endif
             dc.DrawLine(m_sashPosition+m_sashSize-1, m_borderSize, m_sashPosition+m_sashSize-1, h-m_borderSize );
             dc.DrawLine(m_sashPosition+m_sashSize-1, m_borderSize, m_sashPosition+m_sashSize-1, h-m_borderSize );
-
+            
             // Draw the top and bottom edges of the sash, if requested
             if (GetWindowStyle() & wxSP_FULLSASH)
             {
             // Draw the top and bottom edges of the sash, if requested
             if (GetWindowStyle() & wxSP_FULLSASH)
             {
@@ -542,7 +553,12 @@ void wxSplitterWindow::DrawSash(wxDC& dc)
         else
         {
             dc.SetPen(*m_facePen);
         else
         {
             dc.SetPen(*m_facePen);
+            // How to test for Aqua?
+#ifdef __DARWIN__
+            dc.SetBrush(*wxWHITE_BRUSH);
+#else
             dc.SetBrush(*m_faceBrush);
             dc.SetBrush(*m_faceBrush);
+#endif
             dc.DrawRectangle( m_borderSize-2, m_sashPosition + 2, w-m_borderSize+2, m_sashSize - 4);
 
             dc.SetBrush(*wxTRANSPARENT_BRUSH);
             dc.DrawRectangle( m_borderSize-2, m_sashPosition + 2, w-m_borderSize+2, m_sashSize - 4);
 
             dc.SetBrush(*wxTRANSPARENT_BRUSH);
@@ -553,10 +569,16 @@ void wxSplitterWindow::DrawSash(wxDC& dc)
             dc.SetPen(*m_hilightPen);
             dc.DrawLine(m_borderSize-2, m_sashPosition+1, w-m_borderSize+1, m_sashPosition+1);
 
             dc.SetPen(*m_hilightPen);
             dc.DrawLine(m_borderSize-2, m_sashPosition+1, w-m_borderSize+1, m_sashPosition+1);
 
+#ifndef __DARWIN__
             dc.SetPen(*m_mediumShadowPen);
             dc.SetPen(*m_mediumShadowPen);
+#endif
             dc.DrawLine(m_borderSize-1, m_sashPosition+m_sashSize-2, w-m_borderSize+1, m_sashPosition+m_sashSize-2);
 
             dc.DrawLine(m_borderSize-1, m_sashPosition+m_sashSize-2, w-m_borderSize+1, m_sashPosition+m_sashSize-2);
 
+#ifdef __DARWIN__
+            dc.SetPen(*m_lightShadowPen);
+#else
             dc.SetPen(*m_darkShadowPen);
             dc.SetPen(*m_darkShadowPen);
+#endif
             dc.DrawLine(m_borderSize, m_sashPosition+m_sashSize-1, w-m_borderSize, m_sashPosition+m_sashSize-1);
 
             // Draw the left and right edges of the sash, if requested
             dc.DrawLine(m_borderSize, m_sashPosition+m_sashSize-1, w-m_borderSize, m_sashPosition+m_sashSize-1);
 
             // Draw the left and right edges of the sash, if requested