vcl/inc/vcl/settings.hxx | 4 ++-- vcl/source/app/settings.cxx | 17 +++++++++-------- vcl/source/control/ctrl.cxx | 13 +++++++------ vcl/source/window/dockingarea.cxx | 1 + vcl/source/window/menu.cxx | 2 ++ vcl/source/window/toolbox.cxx | 6 ++++-- vcl/source/window/toolbox2.cxx | 3 +++ 7 files changed, 28 insertions(+), 18 deletions(-)
New commits: commit c8ea31264f25ef789b66fc9c988f695342eb2f7a Author: Jan Holesovsky <[email protected]> Date: Thu Jan 17 16:40:24 2013 +0100 Personas: Fix fdo#59208 - get rid of artifacts when we run out of bitmap. So far I am using the same color that is used for the workspace; should it be a problem, we can use a different color. Change-Id: I06fde7f31a9d37d2e387a7e3fd0b6d3d33f8d6e6 diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index e20265d..c79c226 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -55,6 +55,7 @@ static void ImplInitBackground( DockingAreaWindow* pThis ) { Wallpaper aWallpaper( rPersonaBitmap ); aWallpaper.SetStyle( WALLPAPER_TOPRIGHT ); + aWallpaper.SetColor( Application::GetSettings().GetStyleSettings().GetWorkspaceColor() ); // we need to shift the bitmap vertically so that it spans over the // menubar conveniently diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index ada63f7..a163041 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -3890,6 +3890,8 @@ static void ImplInitMenuWindow( Window* pWin, sal_Bool bFont, sal_Bool bMenuBar { Wallpaper aWallpaper( rPersonaBitmap ); aWallpaper.SetStyle( WALLPAPER_TOPRIGHT ); + aWallpaper.SetColor( Application::GetSettings().GetStyleSettings().GetWorkspaceColor() ); + pWin->SetBackground( aWallpaper ); pWin->SetPaintTransparent( sal_False ); pWin->SetParentClipMode( 0 ); commit dbf3077f72881ec44e0bb33c9ffbf6363c381862 Author: Jan Holesovsky <[email protected]> Date: Thu Jan 17 14:25:31 2013 +0100 Personas: Clear the BitmapEx first, so that we can switch off Personas. [Also rename mpPersona*Bitmap -> maPersona*Bitmap, it is not a pointer.] Change-Id: I93cc56b1f30c4fe966b8de87b766e820d9e2cefa diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx index 8e49b2c..9d99ad0 100644 --- a/vcl/inc/vcl/settings.hxx +++ b/vcl/inc/vcl/settings.hxx @@ -351,8 +351,8 @@ private: OUString maPersonaHeaderFooter; ///< Cache the settings to detect changes. - BitmapEx mpPersonaHeaderBitmap; ///< Cache the header bitmap. - BitmapEx mpPersonaFooterBitmap; ///< Cache the footer bitmap. + BitmapEx maPersonaHeaderBitmap; ///< Cache the header bitmap. + BitmapEx maPersonaFooterBitmap; ///< Cache the footer bitmap. }; #define DEFAULT_WORKSPACE_GRADIENT_START_COLOR Color( 0xa3, 0xae, 0xb8 ) diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 9991b90..caedc9d 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -203,8 +203,8 @@ sal_Bool MouseSettings::operator ==( const MouseSettings& rSet ) const ImplStyleData::ImplStyleData() : maPersonaHeaderFooter(), - mpPersonaHeaderBitmap(), - mpPersonaFooterBitmap() + maPersonaHeaderBitmap(), + maPersonaFooterBitmap() { mnRefCount = 1; mnScrollBarSize = 16; @@ -304,8 +304,8 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) : maDialogStyle( rData.maDialogStyle ), maFrameStyle( rData.maFrameStyle ), maPersonaHeaderFooter( rData.maPersonaHeaderFooter ), - mpPersonaHeaderBitmap( rData.mpPersonaHeaderBitmap ), - mpPersonaFooterBitmap( rData.mpPersonaFooterBitmap ) + maPersonaHeaderBitmap( rData.maPersonaHeaderBitmap ), + maPersonaFooterBitmap( rData.maPersonaFooterBitmap ) { mnRefCount = 1; mnBorderSize = rData.mnBorderSize; @@ -718,6 +718,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot return; rHeaderFooter = aOldValue; + rHeaderFooterBitmap = BitmapEx(); // now read the new values and setup bitmaps OUString aHeader, aFooter; @@ -761,14 +762,14 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot const BitmapEx StyleSettings::GetPersonaHeader() const { - setupPersonaHeaderFooter( PERSONA_HEADER, mpData->maPersonaHeaderFooter, mpData->mpPersonaHeaderBitmap ); - return mpData->mpPersonaHeaderBitmap; + setupPersonaHeaderFooter( PERSONA_HEADER, mpData->maPersonaHeaderFooter, mpData->maPersonaHeaderBitmap ); + return mpData->maPersonaHeaderBitmap; } const BitmapEx StyleSettings::GetPersonaFooter() const { - setupPersonaHeaderFooter( PERSONA_FOOTER, mpData->maPersonaHeaderFooter, mpData->mpPersonaFooterBitmap ); - return mpData->mpPersonaFooterBitmap; + setupPersonaHeaderFooter( PERSONA_FOOTER, mpData->maPersonaHeaderFooter, mpData->maPersonaFooterBitmap ); + return mpData->maPersonaFooterBitmap; } // ----------------------------------------------------------------------- commit aab4b03f605ff4273aa41bbbc6fdbf3ffae8daee Author: Jan Holesovsky <[email protected]> Date: Thu Jan 17 12:02:08 2013 +0100 Personas: Fix fdo#59230 - make Personas fully work in non-NWF case too. Change-Id: I19a475f198fcb24c4d66134eb67da719fc99099e diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 307957f..69585dc 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -565,7 +565,8 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) if( !bNativeOk ) { - if( !pThis->IsBackground() ) + if( !pThis->IsBackground() || + ( pThis->GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() ) ) { if( !pThis->IsInPaint() ) ImplDrawTransparentBackground( pThis, aPaintRegion ); @@ -1546,7 +1547,8 @@ void ToolBox::ImplInitSettings( sal_Bool bFont, } else { - if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) ) + if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) || + ( GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() ) ) { SetBackground(); SetPaintTransparent( sal_True ); diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index b9a9853..19399da 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -936,6 +936,9 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) else mbHorz = sal_True; + // Update the background according to Persona if necessary + ImplInitSettings( sal_False, sal_False, sal_True ); + // Hier alles neu ausgeben, da sich Border auch aendert mbCalc = sal_True; mbFormat = sal_True; commit 301efb8ec61966c93c4445920c5720c0d8d8cae5 Author: Jan Holesovsky <[email protected]> Date: Thu Jan 17 10:40:06 2013 +0100 Personas: Fix one more potential crash. Change-Id: Ib7aca26c34aa8484e8c71873805ca8e8812526a7 diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index debdc4f..4da8279 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -429,16 +429,17 @@ void Control::DataChanged( const DataChangedEvent& rDCEvt) (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - AllSettings aSettings = GetSettings(); - StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - sal_uLong nOldOptions = rDCEvt.GetOldSettings()->GetStyleSettings().GetOptions(); - sal_uLong nNewOptions = aStyleSettings.GetOptions(); + const AllSettings* pOldSettings = rDCEvt.GetOldSettings(); - if ( !(nNewOptions & STYLE_OPTION_MONO) && ( nOldOptions & STYLE_OPTION_MONO ) ) + AllSettings aSettings = GetSettings(); + StyleSettings aStyleSettings = aSettings.GetStyleSettings(); + sal_uLong nNewOptions = aStyleSettings.GetOptions(); + + if ( pOldSettings && !(nNewOptions & STYLE_OPTION_MONO) && ( pOldSettings->GetStyleSettings().GetOptions() & STYLE_OPTION_MONO ) ) { nNewOptions |= STYLE_OPTION_MONO; aStyleSettings.SetOptions( nNewOptions ); - aStyleSettings.SetMonoColor( rDCEvt.GetOldSettings()->GetStyleSettings().GetMonoColor() ); + aStyleSettings.SetMonoColor( pOldSettings->GetStyleSettings().GetMonoColor() ); aSettings.SetStyleSettings( aStyleSettings ); SetSettings( aSettings ); } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
