[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/osx

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Fri May 3 19:52:09 UTC 2019


 vcl/osx/salframe.cxx         |    2 ++
 vcl/osx/salnativewidgets.cxx |   17 +++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit d3778236deb7d1e13f70f229c33ab6cfdc1f197f
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Thu Apr 25 16:19:24 2019 +0900
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 3 21:51:12 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 <quikee at gmail.com>
    (cherry picked from commit 43f8ea2195015b2b204f61798daf8b41bd7809b5)
    Reviewed-on: https://gerrit.libreoffice.org/71574
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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:
         {


More information about the Libreoffice-commits mailing list