diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-09 10:25:36 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-03-09 10:25:36 +0100 |
commit | a3cfa3c7fe52422a1df4a6b55ab33a80e38bbcea (patch) | |
tree | c14e8f6a6ff6cb77e81e6aa735cd3a2de2b1f4b8 /svtools/workben | |
parent | c4007b3b84756d4a721c90ba47785fdf8d50a007 (diff) |
slidecopy: less colors
Diffstat (limited to 'svtools/workben')
-rw-r--r-- | svtools/workben/toolpanel/makefile.mk | 1 | ||||
-rw-r--r-- | svtools/workben/toolpanel/toolpaneltest.cxx | 18 |
2 files changed, 13 insertions, 6 deletions
diff --git a/svtools/workben/toolpanel/makefile.mk b/svtools/workben/toolpanel/makefile.mk index 279638a23e2c..e64e3cd8eccd 100644 --- a/svtools/workben/toolpanel/makefile.mk +++ b/svtools/workben/toolpanel/makefile.mk @@ -61,6 +61,7 @@ APP1STDLIBS=\ $(BASEGFXLIB) \ $(SVTOOLLIB) \ +APP1RAPTH=BRAND .IF "$(GUI)"!="UNX" APP1DEF= $(MISC)$/$(TARGET).def diff --git a/svtools/workben/toolpanel/toolpaneltest.cxx b/svtools/workben/toolpanel/toolpaneltest.cxx index 61a1aac27fc3..3850a75c5bf7 100644 --- a/svtools/workben/toolpanel/toolpaneltest.cxx +++ b/svtools/workben/toolpanel/toolpaneltest.cxx @@ -75,10 +75,11 @@ private: class ColoredPanelWindow : public Window { public: - ColoredPanelWindow( Window& i_rParent, const Color& i_rColor ) + ColoredPanelWindow( Window& i_rParent, const Color& i_rColor, const String& i_rTitle ) :Window( &i_rParent ) ,m_aEdit( this, WB_BORDER ) ,m_aTabControl( this ) + ,m_sTitle( i_rTitle ) { SetLineColor(); SetFillColor( i_rColor ); @@ -99,7 +100,11 @@ public: virtual void Paint( const Rectangle& i_rRect ) { - DrawRect( i_rRect ); + const Size aOutputSize( GetOutputSizePixel() ); + const Rectangle aTitleRect( Point( 10, 10 ), Size( aOutputSize.Width() - 20, 20 ) ); + DrawRect( aTitleRect ); + SetTextColor( GetFillColor().IsDark() ? COL_WHITE : COL_BLACK ); + DrawText( aTitleRect, m_sTitle, TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER ); } virtual void GetFocus() @@ -111,11 +116,11 @@ public: { const Size aOutputSize( GetOutputSizePixel() ); m_aEdit.SetPosSizePixel( - Point( 20, 20 ), + Point( 20, 40 ), Size( aOutputSize.Width() - 40, 20 ) ); m_aTabControl.SetPosSizePixel( - Point( 20, 50 ), + Point( 20, 70 ), Size( aOutputSize.Width() - 40, 150 ) ); } @@ -123,6 +128,7 @@ public: private: Edit m_aEdit; TabControl m_aTabControl; + String m_sTitle; }; //============================================================================= @@ -161,7 +167,7 @@ private: //----------------------------------------------------------------------------- ColoredPanel::ColoredPanel( Window& i_rParent, const Color& i_rColor, const sal_Char* i_pAsciiPanelName ) :m_refCount(0) - ,m_aWindow( i_rParent, i_rColor ) + ,m_aWindow( i_rParent, i_rColor, ::rtl::OUString::createFromAscii( i_pAsciiPanelName ) ) ,m_aPanelName( ::rtl::OUString::createFromAscii( i_pAsciiPanelName ) ) ,m_aPanelIcon() { @@ -173,7 +179,7 @@ ColoredPanel::ColoredPanel( Window& i_rParent, const Color& i_rColor, const sal_ //----------------------------------------------------------------------------- ColoredPanel::ColoredPanel( Window& i_rParent, const Color& i_rColor, const String& i_rPanelName ) :m_refCount(0) - ,m_aWindow( i_rParent, i_rColor ) + ,m_aWindow( i_rParent, i_rColor, i_rPanelName ) ,m_aPanelName( i_rPanelName ) ,m_aPanelIcon() { |