1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a bug where DocumentWindow buttons were being drawn too large

This commit is contained in:
ed 2017-09-29 16:06:59 +01:00
parent 54029e776d
commit 53cd6c014c

View file

@ -192,7 +192,7 @@ Button* LookAndFeel_V4::createDocumentWindowButton (int buttonType)
return nullptr;
}
void LookAndFeel_V4::positionDocumentWindowButtons (DocumentWindow&,
void LookAndFeel_V4::positionDocumentWindowButtons (DocumentWindow& dw,
int titleBarX, int titleBarY,
int titleBarW, int titleBarH,
Button* minimiseButton,
@ -200,6 +200,8 @@ void LookAndFeel_V4::positionDocumentWindowButtons (DocumentWindow&,
Button* closeButton,
bool positionTitleBarButtonsOnLeft)
{
titleBarH = jmin (titleBarH, titleBarH - titleBarY);
const int buttonW = (int) (titleBarH * 1.2);
int x = positionTitleBarButtonsOnLeft ? titleBarX