diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2021-05-12 20:01:05 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-08-30 06:09:49 +0200 |
commit | a2c8195f465a2e4346169d2b586c34e8fbed253c (patch) | |
tree | 2ad0a45dfebaaa63e26f96ce244486cf1d0598e4 /vcl/source/control/scrbar.cxx | |
parent | 229136b7c9363bc758c9e925ccfd0c9bb34ceaec (diff) |
tdf#74702 vcl: introduce GetSystemTextColor()
Also rename DrawFlags to SystemDrawColorFlags, added a unit test.
Change-Id: I3cb74b278e43561d1055b3b55b9730cdbdea51aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113559
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/source/control/scrbar.cxx')
-rw-r--r-- | vcl/source/control/scrbar.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 8b812b6e2a01..d929ec00ba9a 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -370,13 +370,13 @@ void ScrollBar::ImplCalc( bool bUpdate ) ImplUpdateRects( bUpdate ); } -void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) +void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); pDev->Push(); pDev->SetMapMode(); - if ( !(nFlags & DrawFlags::Mono) ) + if ( !(nFlags & SystemTextColorFlags::Mono) ) { // DecoView uses the FaceColor... AllSettings aSettings = pDev->GetSettings(); @@ -412,7 +412,7 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, DrawFlags nFlags ) mbCalcSize = true; } -bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFlags) +bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nSystemTextColorFlags) { ScrollbarValue scrValue; @@ -480,7 +480,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD } else { - if ((nDrawFlags & SCRBAR_DRAW_PAGE1) || (nDrawFlags & SCRBAR_DRAW_PAGE2)) + if ((nSystemTextColorFlags & SCRBAR_DRAW_PAGE1) || (nSystemTextColorFlags & SCRBAR_DRAW_PAGE2)) { ControlPart part1 = bHorz ? ControlPart::TrackHorzLeft : ControlPart::TrackVertUpper; ControlPart part2 = bHorz ? ControlPart::TrackHorzRight : ControlPart::TrackVertLower; @@ -505,13 +505,13 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD } } - if (nDrawFlags & SCRBAR_DRAW_PAGE1) + if (nSystemTextColorFlags & SCRBAR_DRAW_PAGE1) bNativeOK = rRenderContext.DrawNativeControl(ControlType::Scrollbar, part1, aCtrlRegion1, nState1, scrValue, OUString()); - if (nDrawFlags & SCRBAR_DRAW_PAGE2) + if (nSystemTextColorFlags & SCRBAR_DRAW_PAGE2) bNativeOK = rRenderContext.DrawNativeControl(ControlType::Scrollbar, part2, aCtrlRegion2, nState2, scrValue, OUString()); } - if ((nDrawFlags & SCRBAR_DRAW_BTN1) || (nDrawFlags & SCRBAR_DRAW_BTN2)) + if ((nSystemTextColorFlags & SCRBAR_DRAW_BTN1) || (nSystemTextColorFlags & SCRBAR_DRAW_BTN2)) { ControlPart part1 = bHorz ? ControlPart::ButtonLeft : ControlPart::ButtonUp; ControlPart part2 = bHorz ? ControlPart::ButtonRight : ControlPart::ButtonDown; @@ -545,13 +545,13 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD } } - if (nDrawFlags & SCRBAR_DRAW_BTN1) + if (nSystemTextColorFlags & SCRBAR_DRAW_BTN1) bNativeOK = rRenderContext.DrawNativeControl(ControlType::Scrollbar, part1, aCtrlRegion1, nState1, scrValue, OUString()); - if (nDrawFlags & SCRBAR_DRAW_BTN2) + if (nSystemTextColorFlags & SCRBAR_DRAW_BTN2) bNativeOK = rRenderContext.DrawNativeControl(ControlType::Scrollbar, part2, aCtrlRegion2, nState2, scrValue, OUString()); } - if ((nDrawFlags & SCRBAR_DRAW_THUMB) && !maThumbRect.IsEmpty()) + if ((nSystemTextColorFlags & SCRBAR_DRAW_THUMB) && !maThumbRect.IsEmpty()) { ControlState nState = IsEnabled() ? ControlState::ENABLED : ControlState::NONE; tools::Rectangle aCtrlRegion(maThumbRect); |