[Libreoffice-commits] core.git: cui/source include/svtools svtools/source svx/source
Caolán McNamara
caolanm at redhat.com
Wed Jul 3 04:49:04 PDT 2013
cui/source/tabpages/tabstpge.cxx | 8 +++++---
include/svtools/ruler.hxx | 2 +-
svtools/source/control/ruler.cxx | 7 +++----
svx/source/dialog/svxruler.cxx | 3 ++-
4 files changed, 11 insertions(+), 9 deletions(-)
New commits:
commit 491bb212fae98c93197401cbd10aff8e24dc541f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 3 12:37:29 2013 +0100
allow changing the fill color user for tab previews
Change-Id: Ie20e900fe9e1f9bfdcd5784b380aa4574d52c001
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 0426c3b..b620af1 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -45,7 +45,9 @@ private:
public:
TabWin_Impl( Window* pParent, WinBits nBits) :
- Window( pParent, nBits ){}
+ Window( pParent, nBits )
+ {
+ }
virtual void Paint( const Rectangle& rRect );
@@ -55,7 +57,7 @@ public:
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTabWin_Impl(Window *pParent, VclBuilder::stringmap &)
{
- return new TabWin_Impl(pParent, WB_BORDER);
+ return new TabWin_Impl(pParent, 0);
}
// static ----------------------------------------------------------------
@@ -87,7 +89,7 @@ void TabWin_Impl::Paint( const Rectangle& )
Size aSize = GetOutputSizePixel();
aPnt.X() = aSize.Width() / 2;
aPnt.Y() = aSize.Height() / 2;
- Ruler::DrawTab( this, aPnt, nTabStyle );
+ Ruler::DrawTab( this, GetSettings().GetStyleSettings().GetFontColor(), aPnt, nTabStyle );
}
// class SvxTabulatorTabPage ---------------------------------------------
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 5a45710..bee6f05 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -767,7 +767,7 @@ public:
sal_uInt16 GetTabCount() const;
const RulerTab* GetTabs() const;
- static void DrawTab( OutputDevice* pDevice,
+ static void DrawTab( OutputDevice* pDevice, const Color &rFillColor,
const Point& rPos, sal_uInt16 nStyle );
void SetStyle( WinBits nStyle );
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 7e5e2f1..0a68369 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -2746,15 +2746,14 @@ void Ruler::SetStyle( WinBits nStyle )
// -----------------------------------------------------------------------
-void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle )
+void Ruler::DrawTab( OutputDevice* pDevice, const Color &rFillColor, const Point& rPos, sal_uInt16 nStyle )
{
- /*const StyleSettings& rStyleSettings =*/ pDevice->GetSettings().GetStyleSettings();
Point aPos( rPos );
- sal_uInt16 nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
+ sal_uInt16 nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
pDevice->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pDevice->SetLineColor();
- pDevice->SetFillColor( pDevice->GetSettings().GetStyleSettings().GetShadowColor() );
+ pDevice->SetFillColor(rFillColor);
ImplCenterTabPos( aPos, nTabStyle );
ImplDrawRulerTab( pDevice, aPos, nTabStyle, nStyle );
pDevice->Pop();
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index e8fd30c..b878b3b 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3571,13 +3571,14 @@ void SvxRuler::Command( const CommandEvent& rCEvt )
const Size aSz(RULER_TAB_WIDTH+2, RULER_TAB_HEIGHT+2);
aDev.SetOutputSize(aSz);
aDev.SetBackground(Wallpaper(Color(COL_WHITE)));
+ Color aFillColor(aDev.GetSettings().GetStyleSettings().GetShadowColor());
const Point aPt(aSz.Width() / 2, aSz.Height() / 2);
for ( sal_uInt16 i = RULER_TAB_LEFT; i < RULER_TAB_DEFAULT; ++i )
{
sal_uInt16 nStyle = bRTL ? i|RULER_TAB_RTL : i;
nStyle |= (sal_uInt16)(bHorz ? WB_HORZ : WB_VERT);
- DrawTab(&aDev, aPt, nStyle);
+ DrawTab(&aDev, aFillColor, aPt, nStyle);
aMenu.InsertItem(i+1,
String(ResId(RID_SVXSTR_RULER_START+i, DIALOG_MGR())),
Image(aDev.GetBitmap(Point(), aSz), Color(COL_WHITE)));
More information about the Libreoffice-commits
mailing list