diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-14 22:15:13 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-15 08:56:26 +0900 |
commit | 9c08a06f5d399a7cd11849a377a82663ef6a528e (patch) | |
tree | 8ceda6bdafd9e41f984b10d6939702f8f3f7b873 /vcl/source/control | |
parent | 85b7494e34ccf6b56d68554b7f32c0bebe5a6fed (diff) |
Fix Button when using double-buffered rendering
Change-Id: Ib2812723141c5dfe39b30c95f12d1aeca9c367bd
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/button.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 82af4fa81ec2..fac1562bc2e7 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -951,9 +951,9 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa break; } - bool bDropDown = ( IsSymbol() && (GetSymbol()==SymbolType::SPIN_DOWN) && GetText().isEmpty() ); + bool bDropDown = (IsSymbol() && (GetSymbol() == SymbolType::SPIN_DOWN) && GetText().isEmpty()); - if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX ) ) + if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX)) { if (GetParent()->IsNativeControlSupported(aCtrlType, PART_ENTIRE_CONTROL)) { @@ -1007,7 +1007,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa if (!bRollOver && !HasFocus()) bDrawMenuSep = false; } - if ((bNativeOK = IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL))) + if ((bNativeOK = rRenderContext.IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL))) { PushButtonValue aControlValue; Rectangle aCtrlRegion(aInRect); @@ -1045,8 +1045,8 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa // prepare single line hint (needed on mac to decide between normal push button and // rectangular bevel button look) Size aFontSize(Application::GetSettings().GetStyleSettings().GetPushButtonFont().GetSize()); - aFontSize = LogicToPixel(aFontSize, MapMode(MAP_POINT)); - Size aInRectSize(LogicToPixel(Size(aInRect.GetWidth(), aInRect.GetHeight()))); + aFontSize = rRenderContext.LogicToPixel(aFontSize, MapMode(MAP_POINT)); + Size aInRectSize(rRenderContext.LogicToPixel(Size(aInRect.GetWidth(), aInRect.GetHeight()))); aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height()); if (((nState & ControlState::ROLLOVER)) || !(GetStyle() & WB_FLATBUTTON)) @@ -1060,7 +1060,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa } // draw content using the same aInRect as non-native VCL would do - ImplDrawPushButtonContent(this, (nState&ControlState::ROLLOVER) ? WINDOW_DRAW_ROLLOVER : 0, + ImplDrawPushButtonContent(&rRenderContext, (nState&ControlState::ROLLOVER) ? WINDOW_DRAW_ROLLOVER : 0, aInRect, bLayout, bDrawMenuSep); if (HasFocus()) |