summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorMichael Jaumann <meta_dev@yahoo.com>2014-09-23 12:34:54 +0000
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-09-29 17:44:07 +0000
commit0ed0974298992ae871a8fbe79f856cf2588aeec6 (patch)
tree3ef38e7bd8cc98824a2912e20357a6f843290708 /vcl/source/window
parente5bbc721d6bd5536bdd34f33fc79933a379f2919 (diff)
fdo#59299 Personas for bottom toolbars
Change-Id: If823964bf3bb67563504db61b6c5d557cab89243 Reviewed-on: https://gerrit.libreoffice.org/11609 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/dockingarea.cxx17
-rw-r--r--vcl/source/window/toolbox.cxx9
2 files changed, 18 insertions, 8 deletions
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index bda794bc1631..6d6416d6ce04 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -46,12 +46,16 @@ DockingAreaWindow::ImplData::~ImplData()
static void ImplInitBackground( DockingAreaWindow* pThis )
{
- const BitmapEx& rPersonaBitmap = Application::GetSettings().GetStyleSettings().GetPersonaHeader();
- if ( !rPersonaBitmap.IsEmpty() && pThis->GetAlign() == WINDOWALIGN_TOP )
+ const StyleSettings rSetting = Application::GetSettings().GetStyleSettings();
+ const BitmapEx& rPersonaBitmap = pThis->GetAlign() == WINDOWALIGN_TOP ? rSetting.GetPersonaHeader() :rSetting.GetPersonaFooter();
+ if ( !rPersonaBitmap.IsEmpty() &&( pThis->GetAlign() == WINDOWALIGN_TOP|| pThis->GetAlign()==WINDOWALIGN_BOTTOM ) )
{
Wallpaper aWallpaper( rPersonaBitmap );
- aWallpaper.SetStyle( WALLPAPER_TOPRIGHT );
- aWallpaper.SetColor( Application::GetSettings().GetStyleSettings().GetWorkspaceColor() );
+ if(pThis->GetAlign()==WINDOWALIGN_TOP )
+ aWallpaper.SetStyle( WALLPAPER_TOPRIGHT );
+ else
+ aWallpaper.SetStyle( WALLPAPER_BOTTOMRIGHT );
+ aWallpaper.SetColor( rSetting.GetWorkspaceColor() );
// we need to shift the bitmap vertically so that it spans over the
// menubar conveniently
@@ -155,6 +159,7 @@ void DockingAreaWindow::Paint( const Rectangle& )
if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) )
{
ToolbarValue aControlValue;
+ const StyleSettings rSetting = Application::GetSettings().GetStyleSettings();
if( GetAlign() == WINDOWALIGN_TOP && ImplGetSVData()->maNWFData.mbMenuBarDockingAreaCommonBG )
{
@@ -162,9 +167,11 @@ void DockingAreaWindow::Paint( const Rectangle& )
// useful for special gradient effects that should cover both windows
aControlValue.mbIsTopDockingArea = true;
}
+
ControlState nState = CTRL_STATE_ENABLED;
+ const bool isFooter = GetAlign() == WINDOWALIGN_BOTTOM && !rSetting.GetPersonaFooter().IsEmpty();
- if ( GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() )
+ if (( GetAlign() == WINDOWALIGN_TOP && !rSetting.GetPersonaHeader().IsEmpty() ) || isFooter )
Erase();
else if ( !ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB )
{
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index c42f80f5a45f..b8ac59a5bad7 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -524,11 +524,12 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect )
bool bNativeOk = false;
if( pThis->ImplIsFloatingMode() && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL) )
bNativeOk = ImplDrawNativeBackground( pThis, aPaintRegion );
-
+ const StyleSettings rSetting = Application::GetSettings().GetStyleSettings();
if( !bNativeOk )
{
+ const bool isFooter = pThis->GetAlign() == WINDOWALIGN_BOTTOM && !rSetting.GetPersonaFooter().IsEmpty();
if( !pThis->IsBackground() ||
- ( pThis->GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() ) )
+ (( pThis->GetAlign() == WINDOWALIGN_TOP && ! rSetting.GetPersonaHeader().IsEmpty() ) || isFooter ) )
{
if( !pThis->IsInPaint() )
ImplDrawTransparentBackground( pThis, aPaintRegion );
@@ -1468,9 +1469,11 @@ void ToolBox::ImplInitSettings( bool bFont,
else
{
if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) ||
- ( GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() ) )
+ ( GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() )||
+ ( GetAlign() == WINDOWALIGN_BOTTOM && !Application::GetSettings().GetStyleSettings().GetPersonaFooter().IsEmpty()) )
{
SetBackground();
+ SetTextColor(rStyleSettings.GetMenuBarTextColor());
SetPaintTransparent( true );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
mpData->maDisplayBackground = Wallpaper( rStyleSettings.GetFaceColor() );