Kaydet (Commit) 49093f11 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

tdf#119965 implement tooltip widget style on macos

Change-Id: I7625adbf365aa908c072ca42060e926569629044
Reviewed-on: https://gerrit.libreoffice.org/71279
Tested-by: Jenkins
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 43f8ea21)
üst 7e2089e4
......@@ -1181,6 +1181,8 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
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 ) );
......
......@@ -255,6 +255,8 @@ bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n
break;
case ControlType::Tooltip: // ** TO DO
if (nPart == ControlPart::Entire)
return true;
break;
case ControlType::MenuPopup:
......@@ -423,6 +425,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:
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment