[Libreoffice-commits] .: 3 commits - svtools/source vcl/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Apr 27 12:53:26 PDT 2012
svtools/source/config/colorcfg.cxx | 9 -
svtools/source/control/ruler.cxx | 328 ++++++-------------------------------
vcl/source/app/settings.cxx | 2
3 files changed, 57 insertions(+), 282 deletions(-)
New commits:
commit 778d80bc2c37e4549daff2cc1f74f8665235407b
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Apr 27 21:48:32 2012 +0200
ruler: Implemented the design by Mirek M.
See http://listarchives.libreoffice.org/global/design/msg04151.html for
details.
Change-Id: I9c01ecd5951deba13ed6ddd2a69946dc1334ca43
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 39ba070..0dd5031 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -279,7 +279,7 @@ void Ruler::ImplInit( WinBits nWinBits )
// Border-Breiten berechnen
if ( nWinBits & WB_BORDER )
- mnBorderWidth = 2;
+ mnBorderWidth = 1;
else
mnBorderWidth = 0;
@@ -543,7 +543,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
nTickCount = nTick3;
}
else
- maVirDev.SetLineColor( GetSettings().GetStyleSettings().GetWindowTextColor() );
+ maVirDev.SetLineColor( GetSettings().GetStyleSettings().GetShadowColor() );
if ( !bNoTicks )
{
@@ -680,7 +680,7 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
ImplVDrawLine( n1, nVirTop, n1, nVirBottom );
ImplVDrawLine( n1, nVirBottom, n2, nVirBottom );
ImplVDrawLine( n2-1, nVirTop, n2-1, nVirBottom );
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
+ maVirDev.SetLineColor( rStyleSettings.GetDarkShadowColor() );
ImplVDrawLine( n2, nVirTop, n2, nVirBottom );
if ( mpData->pBorders[i].nStyle & RULER_BORDER_VARIABLE )
@@ -752,84 +752,13 @@ void Ruler::ImplDrawIndent( const Polygon& rPoly, sal_uInt16 nStyle )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Point aPos1;
Point aPos2;
- sal_uInt16 nIndentStyle = nStyle & RULER_INDENT_STYLE;
if ( nStyle & RULER_STYLE_INVISIBLE )
return;
- if ( nStyle & RULER_STYLE_DONTKNOW )
- {
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
- }
- else
- {
- maVirDev.SetLineColor( rStyleSettings.GetDarkShadowColor() );
- maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
- }
-
+ maVirDev.SetLineColor( rStyleSettings.GetDarkShadowColor() );
+ maVirDev.SetFillColor( rStyleSettings.GetWorkspaceColor() );
maVirDev.DrawPolygon( rPoly );
-
- if ( !(nStyle & RULER_STYLE_DONTKNOW) )
- {
- if ( nIndentStyle == RULER_INDENT_BOTTOM )
- {
- maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
- aPos1 = rPoly.GetPoint( 2 );
- aPos1.X()++;
- aPos2 = rPoly.GetPoint( 1 );
- aPos2.X()++;
- maVirDev.DrawLine( aPos2, aPos1 );
- aPos2.X()--;
- aPos2.Y()++;
- aPos1 = rPoly.GetPoint( 0 );
- aPos1.Y()++;
- maVirDev.DrawLine( aPos2, aPos1 );
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- aPos2 = rPoly.GetPoint( 4 );
- aPos2.Y()++;
- maVirDev.DrawLine( aPos1, aPos2 );
- aPos2.X()--;
- aPos1 = rPoly.GetPoint( 3 );
- aPos1.X()--;
- maVirDev.DrawLine( aPos2, aPos1 );
- aPos1.Y()--;
- aPos2 = rPoly.GetPoint( 2 );
- aPos2.X()++;
- aPos2.Y()--;
- maVirDev.DrawLine( aPos2, aPos1 );
- }
- else
- {
- maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
- aPos1 = rPoly.GetPoint( 2 );
- aPos1.X()++;
- aPos1.Y()++;
- aPos2 = rPoly.GetPoint( 3 );
- aPos2.Y()++;
- maVirDev.DrawLine( aPos1, aPos2 );
- aPos2 = rPoly.GetPoint( 1 );
- aPos2.X()++;
- maVirDev.DrawLine( aPos1, aPos2 );
- aPos2.X()--;
- aPos2.Y()--;
- aPos1 = rPoly.GetPoint( 0 );
- aPos1.Y()--;
- maVirDev.DrawLine( aPos2, aPos1 );
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- aPos2 = rPoly.GetPoint( 4 );
- aPos2.Y()--;
- maVirDev.DrawLine( aPos1, aPos2 );
- aPos2.X()--;
- aPos1 = rPoly.GetPoint( 3 );
- aPos1.X()--;
- maVirDev.DrawLine( aPos2, aPos1 );
- }
-
- maVirDev.SetLineColor( rStyleSettings.GetDarkShadowColor() );
- maVirDev.SetFillColor();
- maVirDev.DrawPolygon( rPoly );
- }
}
// -----------------------------------------------------------------------
@@ -858,7 +787,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- ImplVDrawLine( n, nVirTop, n, nVirBottom );
+ ImplVDrawLine( n, nVirTop, n, nVirBottom-1 );
}
else if ( nIndentStyle == RULER_INDENT_BOTTOM )
{
@@ -1014,7 +943,7 @@ void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nS
if ( nStyle & RULER_STYLE_DONTKNOW )
pDevice->SetFillColor( GetSettings().GetStyleSettings().GetFaceColor() );
else
- pDevice->SetFillColor( GetSettings().GetStyleSettings().GetWindowTextColor() );
+ pDevice->SetFillColor( GetSettings().GetStyleSettings().GetDarkShadowColor() );
if(mpData->bTextRTL)
nStyle |= RULER_TAB_RTL;
@@ -1061,7 +990,7 @@ void Ruler::ImplInitSettings( sal_Bool bFont,
if ( IsControlForeground() )
aColor = GetControlForeground();
else
- aColor = rStyleSettings.GetWindowTextColor();
+ aColor = rStyleSettings.GetDarkShadowColor();
SetTextColor( aColor );
SetTextFillColor();
}
@@ -1072,7 +1001,7 @@ void Ruler::ImplInitSettings( sal_Bool bFont,
if ( IsControlBackground() )
aColor = GetControlBackground();
else
- aColor = rStyleSettings.GetFaceColor();
+ aColor = rStyleSettings.GetWorkspaceColor();
SetBackground( aColor );
}
@@ -1237,7 +1166,7 @@ void Ruler::ImplFormat()
// Margin1, Margin2 und Zwischenraum ausgeben
maVirDev.SetLineColor();
- maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
+ maVirDev.SetFillColor( rStyleSettings.GetWorkspaceColor() );
if ( nM1 > nVirLeft )
ImplVDrawRect( nP1, nVirTop, nM1-1, nVirBottom ); //left gray rectangle
if ( nM2 < nP2 )
@@ -1389,7 +1318,7 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
if ( !bPaint && !(mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
{
- SetFillColor( rStyleSettings.GetFaceColor() );
+ SetFillColor( rStyleSettings.GetWorkspaceColor() );
bEraseRect = sal_True;
}
else
@@ -2156,67 +2085,9 @@ void Ruler::Paint( const Rectangle& )
{
ImplDraw();
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
// Extra-Field beruecksichtigen
if ( mnWinStyle & WB_EXTRAFIELD )
- {
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Top() ),
- Point( maExtraRect.Right()-1, maExtraRect.Top() ) );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Top() ),
- Point( maExtraRect.Left(), maExtraRect.Bottom()-1 ) );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Bottom()-1 ),
- Point( maExtraRect.Right()-1, maExtraRect.Bottom()-1 ) );
- DrawLine( Point( maExtraRect.Right()-1, maExtraRect.Top() ),
- Point( maExtraRect.Right()-1, maExtraRect.Bottom()-1 ) );
- SetLineColor( rStyleSettings.GetLightColor() );
- DrawLine( Point( maExtraRect.Left()+1, maExtraRect.Top()+1 ),
- Point( maExtraRect.Right()-2, maExtraRect.Top()+1 ) );
- DrawLine( Point( maExtraRect.Left()+1, maExtraRect.Top()+1 ),
- Point( maExtraRect.Left()+1, maExtraRect.Bottom()-2 ) );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Bottom() ),
- Point( maExtraRect.Right(), maExtraRect.Bottom() ) );
- DrawLine( Point( maExtraRect.Right(), maExtraRect.Top() ),
- Point( maExtraRect.Right(), maExtraRect.Bottom() ) );
-
- // Imhalt vom Extrafeld ausgeben
ImplDrawExtra( sal_True );
- }
-
- if ( mnWinStyle & WB_BORDER )
- {
- if ( mnWinStyle & WB_HORZ )
- {
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( mnBorderOff, mnHeight-2 ),
- Point( mnWidth, mnHeight-2 ) );
- if ( mnBorderOff )
- {
- DrawLine( Point( mnBorderOff-1, mnHeight-2 ),
- Point( mnBorderOff-1, mnHeight-1 ) );
- }
-
- SetLineColor( rStyleSettings.GetWindowTextColor() );
- DrawLine( Point( mnBorderOff, mnHeight-1 ),
- Point( mnWidth, mnHeight-1 ) );
- }
- else
- {
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( mnWidth-2, mnBorderOff ),
- Point( mnWidth-2, mnHeight ) );
- if ( mnBorderOff )
- {
- DrawLine( Point( mnWidth-2, mnBorderOff-1 ),
- Point( mnWidth-1, mnBorderOff-1 ) );
- }
-
- SetLineColor( rStyleSettings.GetWindowTextColor() );
- DrawLine( Point( mnWidth-1, mnBorderOff ),
- Point( mnWidth-1, mnHeight ) );
- }
- }
}
// -----------------------------------------------------------------------
@@ -2932,7 +2803,7 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle
pDevice->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pDevice->SetLineColor();
- pDevice->SetFillColor( pDevice->GetSettings().GetStyleSettings().GetWindowTextColor() );
+ pDevice->SetFillColor( pDevice->GetSettings().GetStyleSettings().GetShadowColor() );
ImplCenterTabPos( aPos, nTabStyle );
ImplDrawRulerTab( pDevice, aPos, nTabStyle, nStyle );
pDevice->Pop();
commit f42c44e20c3bda7e0e2bc3bd9749df8208ad7171
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Apr 27 19:34:37 2012 +0200
Make the default application background lighter (and remove a hack).
Change-Id: I03f8db9b47ceb9b0240f3ac549681d8362eea0b5
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 41fc238..abdb852 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -495,15 +495,6 @@ ColorConfigValue ColorConfig::GetColorValue(ColorConfigEntry eEntry, sal_Bool bS
{
if(COL_AUTO == sal::static_int_cast<ColorData>(aRet.nColor))
aRet.nColor = ColorConfig::GetDefaultColor(eEntry).GetColor();
- //#103495# don't allow grey between 40% and 60% as application background
- const sal_uInt8 nRed = COLORDATA_RED( aRet.nColor);
- if(eEntry == APPBACKGROUND &&
- (nRed == COLORDATA_GREEN( aRet.nColor)) &&
- (nRed == COLORDATA_BLUE( aRet.nColor)) &&
- nRed > 102 && nRed < 153 )
- {
- aRet.nColor = RGB_COLORDATA(153, 153, 153);
- }
}
return aRet;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 3116b7b..939a751 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -389,7 +389,7 @@ void ImplStyleData::SetStandardStyles()
maWindowTextColor = Color( COL_BLACK );
maDialogColor = Color( COL_LIGHTGRAY );
maDialogTextColor = Color( COL_BLACK );
- maWorkspaceColor = Color( COL_GRAY );
+ maWorkspaceColor = Color( 0xF0, 0xF0, 0xF0 );
maMonoColor = Color( COL_BLACK );
maFieldColor = Color( COL_WHITE );
maFieldTextColor = Color( COL_BLACK );
commit fbd52034c0c091ba11c625a6d020134edf8783e2
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Apr 27 17:50:37 2012 +0200
ruler: Kill STYLE_OPTION_MONO usage.
According to the discussion on the design@ list, we want much more flat look
overall anyway, so no need to distinguish between '3D' and 'flat' look.
Change-Id: Ibf88d722c9ebfa9872ffd9a1a156b77478ded655
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 6f1065a..39ba070 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -228,8 +228,6 @@ ImplRulerData& ImplRulerData::operator=( const ImplRulerData& rData )
void Ruler::ImplInit( WinBits nWinBits )
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
// Default WinBits setzen
if ( !(nWinBits & WB_VERT) )
{
@@ -281,12 +279,7 @@ void Ruler::ImplInit( WinBits nWinBits )
// Border-Breiten berechnen
if ( nWinBits & WB_BORDER )
- {
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- mnBorderWidth = 2;
- else
- mnBorderWidth = 1;
- }
+ mnBorderWidth = 2;
else
mnBorderWidth = 0;
@@ -677,29 +670,18 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
if ( (n2-n1) > 3 )
{
maVirDev.SetLineColor();
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
- else
- maVirDev.SetFillColor( rStyleSettings.GetWindowColor() );
+ maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
ImplVDrawRect( n1, nVirTop, n2, nVirBottom );
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- {
- maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
- ImplVDrawLine( n1+1, nVirTop, n1+1, nVirBottom );
- ImplVDrawLine( n1, nVirTop, n2, nVirTop );
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- ImplVDrawLine( n1, nVirTop, n1, nVirBottom );
- ImplVDrawLine( n1, nVirBottom, n2, nVirBottom );
- ImplVDrawLine( n2-1, nVirTop, n2-1, nVirBottom );
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
- ImplVDrawLine( n2, nVirTop, n2, nVirBottom );
- }
- else
- {
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
- ImplVDrawLine( n1, nVirTop, n1, nVirBottom );
- ImplVDrawLine( n2, nVirTop, n2, nVirBottom );
- }
+
+ maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
+ ImplVDrawLine( n1+1, nVirTop, n1+1, nVirBottom );
+ ImplVDrawLine( n1, nVirTop, n2, nVirTop );
+ maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
+ ImplVDrawLine( n1, nVirTop, n1, nVirBottom );
+ ImplVDrawLine( n1, nVirBottom, n2, nVirBottom );
+ ImplVDrawLine( n2-1, nVirTop, n2-1, nVirBottom );
+ maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
+ ImplVDrawLine( n2, nVirTop, n2, nVirBottom );
if ( mpData->pBorders[i].nStyle & RULER_BORDER_VARIABLE )
{
@@ -710,24 +692,20 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
long nTemp3 = nTemp1+RULER_VAR_SIZE-1;
long nTemp4 = nTemp2+RULER_VAR_SIZE-1;
long nTempY = nTemp2;
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
- else
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
+
+ maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
while ( nTempY <= nTemp4 )
{
ImplVDrawLine( nTemp1, nTempY, nTemp3, nTempY );
nTempY += 2;
}
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+
+ nTempY = nTemp2+1;
+ maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
+ while ( nTempY <= nTemp4 )
{
- nTempY = nTemp2+1;
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- while ( nTempY <= nTemp4 )
- {
- ImplVDrawLine( nTemp1, nTempY, nTemp3, nTempY );
- nTempY += 2;
- }
+ ImplVDrawLine( nTemp1, nTempY, nTemp3, nTempY );
+ nTempY += 2;
}
}
}
@@ -736,31 +714,20 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
{
if ( n2-n1 > RULER_VAR_SIZE+10 )
{
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- {
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- ImplVDrawLine( n1+4, nVirTop+3, n1+4, nVirBottom-3 );
- ImplVDrawLine( n2-5, nVirTop+3, n2-5, nVirBottom-3 );
- maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
- ImplVDrawLine( n1+5, nVirTop+3, n1+5, nVirBottom-3 );
- ImplVDrawLine( n2-4, nVirTop+3, n2-4, nVirBottom-3 );
- }
- else
- {
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
- ImplVDrawLine( n1+4, nVirTop+3, n1+4, nVirBottom-3 );
- ImplVDrawLine( n2-4, nVirTop+3, n2-4, nVirBottom-3 );
- }
+ maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
+ ImplVDrawLine( n1+4, nVirTop+3, n1+4, nVirBottom-3 );
+ ImplVDrawLine( n2-5, nVirTop+3, n2-5, nVirBottom-3 );
+ maVirDev.SetLineColor( rStyleSettings.GetLightColor() );
+ ImplVDrawLine( n1+5, nVirTop+3, n1+5, nVirBottom-3 );
+ ImplVDrawLine( n2-4, nVirTop+3, n2-4, nVirBottom-3 );
}
}
}
else
{
n = n1+((n2-n1)/2);
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- else
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
+ maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
+
if ( mpData->pBorders[i].nStyle & RULER_BORDER_SNAP )
ImplVDrawLine( n, nVirTop, n, nVirBottom );
else if ( mpData->pBorders[i].nStyle & RULER_BORDER_MARGIN )
@@ -803,7 +770,7 @@ void Ruler::ImplDrawIndent( const Polygon& rPoly, sal_uInt16 nStyle )
maVirDev.DrawPolygon( rPoly );
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) && !(nStyle & RULER_STYLE_DONTKNOW) )
+ if ( !(nStyle & RULER_STYLE_DONTKNOW) )
{
if ( nIndentStyle == RULER_INDENT_BOTTOM )
{
@@ -1204,7 +1171,6 @@ void Ruler::ImplFormat()
return;
Size aVirDevSize;
- sal_Bool b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO);
// initialize VirtualDevice
if ( mnWinStyle & WB_HORZ )
@@ -1261,10 +1227,7 @@ void Ruler::ImplFormat()
}
// Obere/untere Kante ausgeben
- if ( b3DLook )
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- else
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
+ maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
ImplVDrawLine( nVirLeft, nVirTop, nM1 - 1, nVirTop ); //top left line
ImplVDrawLine( nM2 +1, nVirTop, nP2 -1, nVirTop ); //top right line
@@ -1274,10 +1237,7 @@ void Ruler::ImplFormat()
// Margin1, Margin2 und Zwischenraum ausgeben
maVirDev.SetLineColor();
- if ( b3DLook )
- maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
- else
- maVirDev.SetFillColor( rStyleSettings.GetWindowColor() );
+ maVirDev.SetFillColor( rStyleSettings.GetFaceColor() );
if ( nM1 > nVirLeft )
ImplVDrawRect( nP1, nVirTop, nM1-1, nVirBottom ); //left gray rectangle
if ( nM2 < nP2 )
@@ -1287,38 +1247,23 @@ void Ruler::ImplFormat()
maVirDev.SetFillColor( rStyleSettings.GetWindowColor() );
ImplVDrawRect( nM1, nVirTop, nM2-1, nVirBottom ); //center rectangle
}
- if ( b3DLook )
+ maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
+ if ( nM1 > nVirLeft )
{
- maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
- if ( nM1 > nVirLeft )
- {
- ImplVDrawLine( nM1-1, nVirTop, nM1-1, nVirBottom );//right line of the left rectangle
- ImplVDrawLine( nP1, nVirBottom, nM1-1, nVirBottom );//bottom line of the left rectangle
- if ( nP1 >= nVirLeft )
- {
- ImplVDrawLine( nP1, nVirTop, nP1, nVirBottom );//left line of the left rectangle
- ImplVDrawLine( nP1, nVirBottom, nP1+1, nVirBottom );//?
- }
- }
- if ( nM2 < nP2 )
+ ImplVDrawLine( nM1-1, nVirTop, nM1-1, nVirBottom );//right line of the left rectangle
+ ImplVDrawLine( nP1, nVirBottom, nM1-1, nVirBottom );//bottom line of the left rectangle
+ if ( nP1 >= nVirLeft )
{
- ImplVDrawLine( nM2+1, nVirBottom, nP2-1, nVirBottom );//bottom line of the right rectangle
- ImplVDrawLine( nM2+1, nVirTop, nM2+1, nVirBottom );//left line of the right rectangle
- if ( nP2 <= nVirRight+1 )
- ImplVDrawLine( nP2-1, nVirTop, nP2-1, nVirBottom );//right line of the right rectangle
+ ImplVDrawLine( nP1, nVirTop, nP1, nVirBottom );//left line of the left rectangle
+ ImplVDrawLine( nP1, nVirBottom, nP1+1, nVirBottom );//?
}
}
- else
+ if ( nM2 < nP2 )
{
- maVirDev.SetLineColor( rStyleSettings.GetWindowTextColor() );
- if ( nP1 >= nVirLeft )
- ImplVDrawLine( nP1, nVirTop, nP1, nVirBottom+1 );
- if ( nM1 > nP1 )
- ImplVDrawLine( nM1, nVirTop, nM1, nVirBottom );
- if ( nM2 < nP2 )
- ImplVDrawLine( nM2, nVirTop, nM2, nVirBottom );
+ ImplVDrawLine( nM2+1, nVirBottom, nP2-1, nVirBottom );//bottom line of the right rectangle
+ ImplVDrawLine( nM2+1, nVirTop, nM2+1, nVirBottom );//left line of the right rectangle
if ( nP2 <= nVirRight+1 )
- ImplVDrawLine( nP2, nVirTop, nP2, nVirBottom+1 );
+ ImplVDrawLine( nP2-1, nVirTop, nP2-1, nVirBottom );//right line of the right rectangle
}
// Lineal-Beschriftung (nur wenn keine Bemassungspfeile)
@@ -1437,32 +1382,19 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
Rectangle aRect = maExtraRect;
sal_Bool bEraseRect = sal_False;
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- {
- aRect.Left() += 2;
- aRect.Top() += 2;
- aRect.Right() -= 2;
- aRect.Bottom() -= 2;
- }
- else
- {
- aRect.Left() += 1;
- aRect.Top() += 1;
- aRect.Right() -= 1;
- aRect.Bottom() -= 1;
- }
+ aRect.Left() += 2;
+ aRect.Top() += 2;
+ aRect.Right() -= 2;
+ aRect.Bottom() -= 2;
if ( !bPaint && !(mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
{
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- SetFillColor( rStyleSettings.GetFaceColor() );
- else
- SetFillColor( rStyleSettings.GetWindowColor() );
+ SetFillColor( rStyleSettings.GetFaceColor() );
bEraseRect = sal_True;
}
else
{
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) && (mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
+ if ( mnExtraStyle & RULER_STYLE_HIGHLIGHT )
{
SetFillColor( rStyleSettings.GetCheckedColor() );
bEraseRect = sal_True;
@@ -1478,10 +1410,7 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
// Inhalt ausgeben
if ( meExtraType == RULER_EXTRA_NULLOFFSET )
{
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- SetLineColor( rStyleSettings.GetButtonTextColor() );
- else
- SetLineColor( rStyleSettings.GetWindowTextColor() );
+ SetLineColor( rStyleSettings.GetButtonTextColor() );
DrawLine( Point( aRect.Left()+1, aRect.Top()+4 ),
Point( aRect.Right()-1, aRect.Top()+4 ) );
DrawLine( Point( aRect.Left()+4, aRect.Top()+1 ),
@@ -1509,9 +1438,6 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
}
ImplDrawTab( this, aDraw, nTabStyle );
}
-
- if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) && (mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
- Invert( aRect );
}
// -----------------------------------------------------------------------
@@ -2235,33 +2161,24 @@ void Ruler::Paint( const Rectangle& )
// Extra-Field beruecksichtigen
if ( mnWinStyle & WB_EXTRAFIELD )
{
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- {
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Top() ),
- Point( maExtraRect.Right()-1, maExtraRect.Top() ) );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Top() ),
- Point( maExtraRect.Left(), maExtraRect.Bottom()-1 ) );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Bottom()-1 ),
- Point( maExtraRect.Right()-1, maExtraRect.Bottom()-1 ) );
- DrawLine( Point( maExtraRect.Right()-1, maExtraRect.Top() ),
- Point( maExtraRect.Right()-1, maExtraRect.Bottom()-1 ) );
- SetLineColor( rStyleSettings.GetLightColor() );
- DrawLine( Point( maExtraRect.Left()+1, maExtraRect.Top()+1 ),
- Point( maExtraRect.Right()-2, maExtraRect.Top()+1 ) );
- DrawLine( Point( maExtraRect.Left()+1, maExtraRect.Top()+1 ),
- Point( maExtraRect.Left()+1, maExtraRect.Bottom()-2 ) );
- DrawLine( Point( maExtraRect.Left(), maExtraRect.Bottom() ),
- Point( maExtraRect.Right(), maExtraRect.Bottom() ) );
- DrawLine( Point( maExtraRect.Right(), maExtraRect.Top() ),
- Point( maExtraRect.Right(), maExtraRect.Bottom() ) );
- }
- else
- {
- SetLineColor( rStyleSettings.GetWindowTextColor() );
- SetFillColor( rStyleSettings.GetWindowColor() );
- DrawRect( maExtraRect );
- }
+ SetLineColor( rStyleSettings.GetShadowColor() );
+ DrawLine( Point( maExtraRect.Left(), maExtraRect.Top() ),
+ Point( maExtraRect.Right()-1, maExtraRect.Top() ) );
+ DrawLine( Point( maExtraRect.Left(), maExtraRect.Top() ),
+ Point( maExtraRect.Left(), maExtraRect.Bottom()-1 ) );
+ DrawLine( Point( maExtraRect.Left(), maExtraRect.Bottom()-1 ),
+ Point( maExtraRect.Right()-1, maExtraRect.Bottom()-1 ) );
+ DrawLine( Point( maExtraRect.Right()-1, maExtraRect.Top() ),
+ Point( maExtraRect.Right()-1, maExtraRect.Bottom()-1 ) );
+ SetLineColor( rStyleSettings.GetLightColor() );
+ DrawLine( Point( maExtraRect.Left()+1, maExtraRect.Top()+1 ),
+ Point( maExtraRect.Right()-2, maExtraRect.Top()+1 ) );
+ DrawLine( Point( maExtraRect.Left()+1, maExtraRect.Top()+1 ),
+ Point( maExtraRect.Left()+1, maExtraRect.Bottom()-2 ) );
+ DrawLine( Point( maExtraRect.Left(), maExtraRect.Bottom() ),
+ Point( maExtraRect.Right(), maExtraRect.Bottom() ) );
+ DrawLine( Point( maExtraRect.Right(), maExtraRect.Top() ),
+ Point( maExtraRect.Right(), maExtraRect.Bottom() ) );
// Imhalt vom Extrafeld ausgeben
ImplDrawExtra( sal_True );
@@ -2271,34 +2188,30 @@ void Ruler::Paint( const Rectangle& )
{
if ( mnWinStyle & WB_HORZ )
{
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ SetLineColor( rStyleSettings.GetShadowColor() );
+ DrawLine( Point( mnBorderOff, mnHeight-2 ),
+ Point( mnWidth, mnHeight-2 ) );
+ if ( mnBorderOff )
{
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( mnBorderOff, mnHeight-2 ),
- Point( mnWidth, mnHeight-2 ) );
- if ( mnBorderOff )
- {
- DrawLine( Point( mnBorderOff-1, mnHeight-2 ),
- Point( mnBorderOff-1, mnHeight-1 ) );
- }
+ DrawLine( Point( mnBorderOff-1, mnHeight-2 ),
+ Point( mnBorderOff-1, mnHeight-1 ) );
}
+
SetLineColor( rStyleSettings.GetWindowTextColor() );
DrawLine( Point( mnBorderOff, mnHeight-1 ),
Point( mnWidth, mnHeight-1 ) );
}
else
{
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ SetLineColor( rStyleSettings.GetShadowColor() );
+ DrawLine( Point( mnWidth-2, mnBorderOff ),
+ Point( mnWidth-2, mnHeight ) );
+ if ( mnBorderOff )
{
- SetLineColor( rStyleSettings.GetShadowColor() );
- DrawLine( Point( mnWidth-2, mnBorderOff ),
- Point( mnWidth-2, mnHeight ) );
- if ( mnBorderOff )
- {
- DrawLine( Point( mnWidth-2, mnBorderOff-1 ),
- Point( mnWidth-1, mnBorderOff-1 ) );
- }
+ DrawLine( Point( mnWidth-2, mnBorderOff-1 ),
+ Point( mnWidth-1, mnBorderOff-1 ) );
}
+
SetLineColor( rStyleSettings.GetWindowTextColor() );
DrawLine( Point( mnWidth-1, mnBorderOff ),
Point( mnWidth-1, mnHeight ) );
More information about the Libreoffice-commits
mailing list