[Libreoffice-commits] core.git: vcl/osx
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 26 11:41:28 UTC 2019
vcl/osx/salframe.cxx | 2 ++
vcl/osx/salnativewidgets.cxx | 17 +++++++++++++++++
2 files changed, 19 insertions(+)
New commits:
commit 43f8ea2195015b2b204f61798daf8b41bd7809b5
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Thu Apr 25 16:19:24 2019 +0900
Commit: Tomaž Vajngerl <quikee at 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 <quikee at 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:
{
More information about the Libreoffice-commits
mailing list