summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-06-01 11:56:32 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-07-22 22:03:05 +0200
commit2f961c7a811bdff66a94c20573798d58b565195a (patch)
treec5653710b30618295ebba147ac73e451b7ce60c1 /sfx2
parent3bbe38a60b4a9ae50b59e41a02292e639ec28c09 (diff)
do not use delayed layout in TitledDockingWindow
The layout is only performed in Paint(), so if something uses geometry before that happens (may happen with tiled rendering), then is not up to date. I don't see why delay it anyway, there seems to be usually just one resize, and only during init I see two of them, which can presumably be fixed if needed. Change-Id: I7133f3c6be41bc6480f86d1053b455d42c40b9ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116529 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/titledockwin.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 2ab7833d628a..30dd8907933c 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -39,7 +39,6 @@ namespace sfx2
,m_aToolbox( VclPtr<ToolBox>::Create(this) )
,m_aContentWindow( VclPtr<vcl::Window>::Create(this, WB_DIALOGCONTROL) )
,m_aBorder( 3, 1, 3, 3 )
- ,m_bLayoutPending( false )
,m_nTitleBarHeight(0)
{
SetBackground( Wallpaper() );
@@ -83,20 +82,12 @@ namespace sfx2
void TitledDockingWindow::Resize()
{
SfxDockingWindow::Resize();
- impl_scheduleLayout();
- }
-
-
- void TitledDockingWindow::impl_scheduleLayout()
- {
- m_bLayoutPending = true;
+ impl_layout();
}
void TitledDockingWindow::impl_layout()
{
- m_bLayoutPending = false;
-
m_aToolbox->ShowItem( ToolBoxItemId(1), !IsFloatingMode() );
const Size aToolBoxSize( m_aToolbox->CalcWindowSizePixel() );
@@ -143,9 +134,6 @@ namespace sfx2
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- if (m_bLayoutPending)
- impl_layout();
-
SfxDockingWindow::Paint(rRenderContext, i_rArea);
rRenderContext.Push(PushFlags::FONT | PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
@@ -240,7 +228,7 @@ namespace sfx2
switch ( i_nType )
{
case StateChangedType::InitShow:
- impl_scheduleLayout();
+ impl_layout();
break;
default:;
}
@@ -260,7 +248,7 @@ namespace sfx2
case DataChangedEventType::FONTS:
case DataChangedEventType::FONTSUBSTITUTION:
{
- impl_scheduleLayout();
+ impl_layout();
Invalidate();
}
break;