Update of /cvsroot/audacity/audacity-src/src/widgets
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv9701/src/widgets

Modified Files:
        ASlider.cpp Grabber.cpp Meter.cpp 
Log Message:
-Improvements to backgrounds when theming

Index: Grabber.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Grabber.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Grabber.cpp 22 Oct 2006 09:54:18 -0000      1.2
+++ Grabber.cpp 4 Jul 2007 10:16:43 -0000       1.3
@@ -29,6 +29,7 @@
 #include <wx/window.h>
 
 #include "Grabber.h"
+#include "../Experimental.h"
 
 #include "../AColor.h"
 
@@ -93,9 +94,25 @@
    wxRect r = GetRect();
    int y, left, right, top, bottom;
 
+#ifndef EXPERIMENTAL_THEMING
+   AColor::Medium(&dc, mOver);
+   dc.DrawRectangle(r);
+#else
    // Paint the background
+   if( mOver )
+   {
    AColor::Medium(&dc, mOver);
    dc.DrawRectangle(r);
+   }
+   else
+   {
+      // Get colour from parent... 
+      // when parent colour changes, child colour might not!
+      wxBrush brush( GetParent()->GetBackgroundColour() );
+      dc.SetBrush( brush );
+      dc.DrawRectangle(r);
+   }
+#endif
 
 #ifndef __WXMAC__
 

Index: ASlider.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/ASlider.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- ASlider.cpp 29 May 2007 00:14:42 -0000      1.57
+++ ASlider.cpp 4 Jul 2007 10:16:43 -0000       1.58
@@ -68,6 +68,7 @@
 #endif
 
 #include "ASlider.h"
+#include "../Experimental.h"
 
 #include "../AColor.h"
 #include "../ImageManipulation.h"
@@ -1102,6 +1103,11 @@
 {
    wxPaintDC dc(this);
 
+#ifdef EXPERIMENTAL_THEMING
+   wxColour Col(GetParent()->GetBackgroundColour());
+   this->SetBackgroundColour( Col );
+#endif
+
    mLWSlider->OnPaint(dc, false);
 
    if( mSliderIsFocused )

Index: Meter.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Meter.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Meter.cpp   24 Jun 2007 23:19:14 -0000      1.28
+++ Meter.cpp   4 Jul 2007 10:16:43 -0000       1.29
@@ -64,6 +64,7 @@
 
 #include "../Theme.h"
 #include "../AllThemeResources.h"
+#include "../Experimental.h"
 
 //
 // The Meter passes itself messages via this queue so that it can
@@ -761,6 +762,13 @@
       HandleLayout();
 
 #ifndef USE_AQUA_THEME
+#ifdef EXPERIMENTAL_THEMING
+   if( !mMeterDisabled )
+   {
+      mBkgndBrush.SetColour( GetParent()->GetBackgroundColour() );
+   }
+#endif
+
    dc.SetPen(*wxTRANSPARENT_PEN);
    dc.SetBrush(mBkgndBrush);
    dc.DrawRectangle(0, 0, mWidth, mHeight);


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to