summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-12 21:08:50 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-12 22:53:43 +0200
commit053d4c9c7a268dcee5667b6905a8fd946c9bdae9 (patch)
tree7dd5257726346a51a9f295ed853b10e791d40bc7 /sw
parentd996328cd5f46eeed2df0cbd510eda28e2f7cef9 (diff)
Header/Footer: small painting improvements
The dashed line is now 1px wide and has smaller dashes. The separator button has also smaller padding.
Diffstat (limited to 'sw')
-rwxr-xr-xsw/source/core/layout/paintfrm.cxx16
-rw-r--r--sw/source/ui/docvw/HeaderFooterWin.cxx2
2 files changed, 6 insertions, 12 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index f384bcca827b..e0f1c81cecb4 100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3275,8 +3275,6 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
}
}
-#define LINE_HALF_THICKNESS 10
-
drawinglayer::primitive2d::Primitive2DSequence lcl_CreateHeaderFooterSeparatorPrimitives(
const SwPageFrm* pPageFrm, double nLineY )
{
@@ -3293,8 +3291,8 @@ drawinglayer::primitive2d::Primitive2DSequence lcl_CreateHeaderFooterSeparatorPr
// Dashed line in twips
std::vector< double > aStrokePattern;
- aStrokePattern.push_back( 110 );
- aStrokePattern.push_back( 110 );
+ aStrokePattern.push_back( 40 );
+ aStrokePattern.push_back( 40 );
// Compute the dashed line primitive
@@ -3302,11 +3300,10 @@ drawinglayer::primitive2d::Primitive2DSequence lcl_CreateHeaderFooterSeparatorPr
aLinePolygon.append( aLeft );
aLinePolygon.append( aRight );
- double nThickness = double( LINE_HALF_THICKNESS ) * 2;
drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D * pLine =
new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D (
basegfx::B2DPolyPolygon( aLinePolygon ),
- drawinglayer::attribute::LineAttribute( aLineColor, nThickness ),
+ drawinglayer::attribute::LineAttribute( aLineColor ),
drawinglayer::attribute::StrokeAttribute( aStrokePattern ) );
aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( pLine );
@@ -3408,9 +3405,6 @@ void SwPageFrm::PaintDecorators( ) const
{
drawinglayer::processor2d::BaseProcessor2D* pProcessor = CreateProcessor2D();
- // Line thickness in px
- long nHalfThickness = pGlobalShell->GetOut()->LogicToPixel( Point( 0, LINE_HALF_THICKNESS ) ).Y();
-
// Header
const SwFrm* pHeaderFrm = Lower();
if ( !pHeaderFrm->IsHeaderFrm() )
@@ -3420,7 +3414,7 @@ void SwPageFrm::PaintDecorators( ) const
long nXOff = std::min( aBodyRect.Right(), rVisArea.Right() );
long nHeaderYOff = aBodyRect.Top();
- Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nHeaderYOff + nHalfThickness ) );
+ Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nHeaderYOff ) );
rEditWin.SetHeaderFooterControl( this, true, nOutputOff );
pProcessor->process( lcl_CreateHeaderFooterSeparatorPrimitives(
@@ -3436,7 +3430,7 @@ void SwPageFrm::PaintDecorators( ) const
}
long nFooterYOff = aBodyRect.Bottom();
- nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nFooterYOff - nHalfThickness ) );
+ nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nFooterYOff ) );
rEditWin.SetHeaderFooterControl( this, false, nOutputOff );
pProcessor->process( lcl_CreateHeaderFooterSeparatorPrimitives(
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx
index 2f9a99cc430b..c8e18f872876 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -51,7 +51,7 @@
#include <vcl/menubtn.hxx>
#include <vcl/svapp.hxx>
-#define TEXT_PADDING 7
+#define TEXT_PADDING 5
#define BOX_DISTANCE 10
#define BUTTON_WIDTH 18