@@ -735,7 +735,12 @@ void PlugDataLook::drawCornerResizer(Graphics& g, int w, int h, bool isMouseOver
735735
736736void PlugDataLook::drawTooltip (Graphics& g, String const & text, int width, int height)
737737{
738- auto bounds = Rectangle<float >(0 , 0 , width, height).reduced (ProjectInfo::canUseSemiTransparentWindows () ? 6 : 0 );
738+ #if JUCE_WINDOWS
739+ auto expandTooltip = false ;
740+ #else
741+ auto expandTooltip = ProjectInfo::canUseSemiTransparentWindows ();
742+ #endif
743+ auto bounds = Rectangle<float >(0 , 0 , width, height).reduced (expandTooltip ? 6 : 0 );
739744 auto shadowBounds = bounds.reduced (2 );
740745 auto const cornerSize = ProjectInfo::canUseSemiTransparentWindows () ? Corners::defaultCornerRadius : 0 ;
741746
@@ -769,7 +774,7 @@ void PlugDataLook::drawTooltip(Graphics& g, String const& text, int width, int h
769774 }
770775 }
771776
772- auto textOffset = ProjectInfo::canUseSemiTransparentWindows () ? 10 : 0 ;
777+ auto textOffset = expandTooltip ? 10 : 0 ;
773778 TextLayout tl;
774779 tl.createLayoutWithBalancedLineLengths (s, (float )maxToolTipWidth);
775780 tl.draw (g, bounds.withSizeKeepingCentre (width - (20 + textOffset), height - (2 + textOffset)));
@@ -851,6 +856,12 @@ void PlugDataLook::drawPropertyPanelSectionHeader(Graphics& g, String const& nam
851856
852857Rectangle<int > PlugDataLook::getTooltipBounds (String const & tipText, Point<int > screenPos, Rectangle<int > parentArea)
853858{
859+ #if JUCE_WINDOWS
860+ auto expandTooltip = false ;
861+ #else
862+ auto expandTooltip = ProjectInfo::canUseSemiTransparentWindows ();
863+ #endif
864+
854865 float const tooltipFontSize = 14 .0f ;
855866 int const maxToolTipWidth = 1000 ;
856867
@@ -882,7 +893,7 @@ Rectangle<int> PlugDataLook::getTooltipBounds(String const& tipText, Point<int>
882893
883894 return Rectangle<int >(screenPos.x > parentArea.getCentreX () ? screenPos.x - (w + 12 ) : screenPos.x + 24 ,
884895 screenPos.y > parentArea.getCentreY () ? screenPos.y - (h + 6 ) : screenPos.y + 6 ,
885- w, h).expanded (ProjectInfo::canUseSemiTransparentWindows () ? 6 : 0 )
896+ w, h).expanded (expandTooltip ? 6 : 0 )
886897 .constrainedWithin (parentArea);
887898}
888899
0 commit comments