diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-04-25 16:19:24 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-03 21:51:12 +0200 |
commit | d3778236deb7d1e13f70f229c33ab6cfdc1f197f (patch) | |
tree | 39041df1a3130b1d1a8588c241e41fba00a42b48 | |
parent | 7bfbac57ee1c0ad1e22f6fd351882e027975b635 (diff) |
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 <quikee@gmail.com>
(cherry picked from commit 43f8ea2195015b2b204f61798daf8b41bd7809b5)
Reviewed-on: https://gerrit.libreoffice.org/71574
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/osx/salframe.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/salnativewidgets.cxx | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 50a899c9da4d..797974727b1e 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1195,6 +1195,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 d89fecf1681e..8d4b5fc229c5 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -253,6 +253,8 @@ bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n break; case ControlType::Tooltip: // ** TO DO + if (nPart == ControlPart::Entire) + return true; break; case ControlType::MenuPopup: @@ -421,6 +423,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: { |