]> git.saurik.com Git - wxWidgets.git/commitdiff
The list ctrl doesn't draw any focus
authorRobert Roebling <robert@roebling.de>
Sun, 22 Feb 2004 18:10:24 +0000 (18:10 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 22 Feb 2004 18:10:24 +0000 (18:10 +0000)
    item under Mac at all.

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

src/generic/listctrl.cpp

index 4c7760728a28156abd50b6746954a7f99a993f8d..dbd275f0488be95c6147fd002692c8fb7635ca84 100644 (file)
@@ -2698,22 +2698,18 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         }
     }
 
+#ifndef __WXMAC__
+    // Don't draw rect outline under Mac at all.
     if ( HasCurrent() )
     {
-        // don't draw rect outline under Max if we already have the background
-        // color but under other platforms only draw it if we do: it is a bit
-        // silly to draw "focus rect" if we don't have focus!
-#ifdef __WXMAC__
-        if ( !m_hasFocus )
-#else // !__WXMAC__
         if ( m_hasFocus )
-#endif // __WXMAC__/!__WXMAC__
         {
             dc.SetPen( *wxBLACK_PEN );
             dc.SetBrush( *wxTRANSPARENT_BRUSH );
             dc.DrawRectangle( GetLineHighlightRect(m_current) );
         }
     }
+#endif
 
     dc.EndDrawing();
 }
@@ -3069,9 +3065,9 @@ void wxListMainWindow::OnArrowChar(size_t newCurrent, const wxKeyEvent& event)
     {
         ChangeCurrent(newCurrent);
 
-       // refresh the old focus to remove it
-       RefreshLine( oldCurrent );
-       
+        // refresh the old focus to remove it
+        RefreshLine( oldCurrent );
+
         // select all the items between the old and the new one
         if ( oldCurrent > newCurrent )
         {
@@ -3088,16 +3084,15 @@ void wxListMainWindow::OnArrowChar(size_t newCurrent, const wxKeyEvent& event)
             HighlightAll(FALSE);
 
         ChangeCurrent(newCurrent);
-
-       // refresh the old focus to remove it
-       RefreshLine( oldCurrent );
+        
+        // refresh the old focus to remove it
+        RefreshLine( oldCurrent );
 
         if ( !event.ControlDown() )
         {
             HighlightLine( m_current, TRUE );
         }
     }
-
        
     RefreshLine( m_current );