Kaydet (Commit) 956aae27 authored tarafından Jan Holesovsky's avatar Jan Holesovsky Kaydeden (comit) Michael Meeks

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
üst 66a5cc46
......@@ -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));
}
......
......@@ -27,6 +27,7 @@ class ToolBox;
namespace sfx2 { namespace sidebar {
/// Draws the sidebar ToolBoxes (groups of toolbar buttons).
class ToolBoxBackground
: public Window
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment