diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-05-17 23:23:24 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:39 +0100 |
commit | 956aae27b85d914a23044ebe437484f0dee26815 (patch) | |
tree | 96ad9b9e37e22c3c2fddece1fa6897f7f3e97505 /sfx2 | |
parent | 66a5cc468cef0c6db8b42b7f25367f04208e6f2e (diff) |
sidebar: Simplify the look of the toolboxes.
Get rid of the background (that is not based on the theme the user uses, so
will not play good with system integration), and just draw a shadow frame
around the toolbar buttons.
[We cannot get rid of that for good, the controls then look 'lost in space'
;-)]
Change-Id: I1325a341c9cf3e5a91e102e233916735de7f8064
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/ToolBoxBackground.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/sidebar/ToolBoxBackground.hxx | 1 |
2 files changed, 7 insertions, 17 deletions
diff --git a/sfx2/source/sidebar/ToolBoxBackground.cxx b/sfx2/source/sidebar/ToolBoxBackground.cxx index d98f709f1f77..a5105c9f3f64 100644 --- a/sfx2/source/sidebar/ToolBoxBackground.cxx +++ b/sfx2/source/sidebar/ToolBoxBackground.cxx @@ -21,8 +21,8 @@ #include "sfx2/sidebar/Tools.hxx" #include "sfx2/sidebar/Theme.hxx" +#include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> -#include <vcl/gradient.hxx> #include <svl/smplhint.hxx> @@ -32,8 +32,6 @@ ToolBoxBackground::ToolBoxBackground (Window* pParentWindow) : Window(pParentWindow, WB_DIALOGCONTROL), maPadding(Tools::RectangleToSvBorder(Theme::GetRectangle(Theme::Rect_ToolBoxPadding))) { - SetBackground(Theme::GetPaint(Theme::Paint_ToolBoxBackground).GetWallpaper()); - #ifdef DEBUG SetText(A2S("ToolBoxBackground")); #endif @@ -87,19 +85,11 @@ void ToolBoxBackground::Paint (const Rectangle& rRect) { Window::Paint(rRect); - Rectangle aBox (Point(0,0), GetSizePixel()); - - const sidebar::Paint aTopLeftBorderPaint (Theme::GetPaint(Theme::Paint_ToolBoxBorderTopLeft)); - const sidebar::Paint aCenterBorderPaint (Theme::GetPaint(Theme::Paint_ToolBoxBorderCenterCorners)); - const sidebar::Paint aBottomRightBorderPaint (Theme::GetPaint(Theme::Paint_ToolBoxBorderBottomRight)); - const Rectangle aBorderSize (Theme::GetRectangle(Theme::Rect_ToolBoxBorder)); - DrawHelper::DrawBevelBorder ( - *this, - aBox, - Tools::RectangleToSvBorder(aBorderSize), - aTopLeftBorderPaint, - aCenterBorderPaint, - aBottomRightBorderPaint); + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + SetFillColor(); + SetLineColor( rStyleSettings.GetShadowColor() ); + + DrawRect( Rectangle( Point( 0, 0 ), GetSizePixel() ) ); } @@ -109,7 +99,6 @@ void ToolBoxBackground::DataChanged (const DataChangedEvent& rEvent) { (void)rEvent; - SetBackground(Theme::GetPaint(Theme::Paint_ToolBoxBackground).GetWallpaper()); maPadding = Tools::RectangleToSvBorder(Theme::GetRectangle(Theme::Rect_ToolBoxPadding)); } diff --git a/sfx2/source/sidebar/ToolBoxBackground.hxx b/sfx2/source/sidebar/ToolBoxBackground.hxx index e5204b921204..f1d1bdc62318 100644 --- a/sfx2/source/sidebar/ToolBoxBackground.hxx +++ b/sfx2/source/sidebar/ToolBoxBackground.hxx @@ -27,6 +27,7 @@ class ToolBox; namespace sfx2 { namespace sidebar { +/// Draws the sidebar ToolBoxes (groups of toolbar buttons). class ToolBoxBackground : public Window { |