1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 15:23:48 +01:00

Bug 1451 - On Mac the background of the Pinned/Unpinned button is not the same color as the Timeline

Per comments in the bug, fixed by making the pinned/unpinned button more clearly a button.

This involved adding a new type of grabber that does not have the ribs for dragging it and acts as a spacer.
Also fixing grabber so that it does not have to be at position (0,0)
Also making the ruler 1 pixel higher.
Also changing the pin button to be a toggle button that changes from up to down on a click.
Also fixing AButton so that an image can be bigger than the button.
This commit is contained in:
James Crook
2016-08-11 21:54:45 +01:00
parent eebe4a961e
commit 35c033d3fa
4 changed files with 41 additions and 10 deletions

View File

@@ -748,8 +748,9 @@ AButton * ToolBar::MakeButton(wxWindow *parent,
bool processdownevents,
wxSize size)
{
int xoff = (size.GetWidth() - theTheme.Image(eStandardUp).GetWidth())/2;
int yoff = (size.GetHeight() - theTheme.Image(eStandardUp).GetHeight())/2;
// wxMax to cater for case of image being bigger than the button.
int xoff = wxMax( 0, (size.GetWidth() - theTheme.Image(eStandardUp).GetWidth())/2);
int yoff = wxMax( 0, (size.GetHeight() - theTheme.Image(eStandardUp).GetHeight())/2);
typedef std::unique_ptr<wxImage> wxImagePtr;
wxImagePtr up2 (OverlayImage(eUp, eStandardUp, xoff, yoff));
@@ -774,8 +775,9 @@ void ToolBar::MakeAlternateImages(AButton &button, int idx,
teBmps eDisabled,
wxSize size)
{
int xoff = (size.GetWidth() - theTheme.Image(eStandardUp).GetWidth())/2;
int yoff = (size.GetHeight() - theTheme.Image(eStandardUp).GetHeight())/2;
// wxMax to cater for case of image being bigger than the button.
int xoff = wxMax( 0, (size.GetWidth() - theTheme.Image(eStandardUp).GetWidth())/2);
int yoff = wxMax( 0, (size.GetHeight() - theTheme.Image(eStandardUp).GetHeight())/2);
typedef std::unique_ptr<wxImage> wxImagePtr;
wxImagePtr up (OverlayImage(eUp, eStandardUp, xoff, yoff));