vcl/osx/salframe.cxx | 2 ++ vcl/osx/salnativewidgets.cxx | 17 +++++++++++++++++ 2 files changed, 19 insertions(+)
New commits: commit 43f8ea2195015b2b204f61798daf8b41bd7809b5 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Thu Apr 25 16:19:24 2019 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Fri Apr 26 13:40:01 2019 +0200 tdf#119965 implement tooltip widget style on macos Change-Id: I7625adbf365aa908c072ca42060e926569629044 Reviewed-on: https://gerrit.libreoffice.org/71279 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 3666f500b36f..761f7898d6ad 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1257,6 +1257,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP aStyleSettings.SetTitleFont( aTitleFont ); aStyleSettings.SetFloatTitleFont( aTitleFont ); + vcl::Font aTooltipFont(getFont([NSFont toolTipsFontOfSize: 0], nDPIY, aAppFont)); + aStyleSettings.SetHelpFont(aTooltipFont); Color aHighlightColor( getColor( [NSColor selectedTextBackgroundColor], aStyleSettings.GetHighlightColor(), mpNSWindow ) ); diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index cab5ae940a3c..91c694bfcb45 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -214,6 +214,8 @@ bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n break; case ControlType::Tooltip: // ** TO DO + if (nPart == ControlPart::Entire) + return true; break; case ControlType::MenuPopup: @@ -382,6 +384,21 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, } break; + case ControlType::Tooltip: + { + HIThemeBackgroundDrawInfo aThemeBackgroundInfo; + aThemeBackgroundInfo.version = 0; + aThemeBackgroundInfo.state = getState( nState ); + aThemeBackgroundInfo.kind = kThemeBrushAlertBackgroundActive; + rc.size.width += 2; + rc.size.height += 2; + + HIThemeApplyBackground( &rc, &aThemeBackgroundInfo, mrContext, kHIThemeOrientationNormal); + CGContextFillRect( mrContext, rc ); + bOK = true; + } + break; + case ControlType::Menubar: case ControlType::MenuPopup: { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits