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

Option so (theme) developers can work with Mac buttons on PC (and vice versa)

This commit is contained in:
James Crook
2017-04-25 17:19:46 +01:00
parent de798b17d5
commit 2cc39d791f
2 changed files with 46 additions and 16 deletions

View File

@@ -52,6 +52,7 @@ in which buttons can be placed.
#include "../commands/Keyboard.h"
#include "../widgets/AButton.h"
#include "../widgets/Grabber.h"
#include "../Prefs.h"
////////////////////////////////////////////////////////////
/// ToolBarResizer
@@ -705,28 +706,50 @@ void ToolBar::MakeRecoloredImage( teBmps eBmpOut, teBmps eBmpIn )
void ToolBar:: MakeButtonBackgroundsLarge()
{
#ifdef USE_AQUA_THEME
MakeMacRecoloredImage( bmpRecoloredUpLarge, bmpMacUpButton );
MakeMacRecoloredImage( bmpRecoloredDownLarge, bmpMacDownButton );
MakeMacRecoloredImage( bmpRecoloredHiliteLarge, bmpMacHiliteButton );
#else
MakeRecoloredImage( bmpRecoloredUpLarge, bmpUpButtonLarge );
MakeRecoloredImage( bmpRecoloredDownLarge, bmpDownButtonLarge );
MakeRecoloredImage( bmpRecoloredHiliteLarge, bmpHiliteButtonLarge );
bool bUseAqua = false;
#ifdef EXPERIMENTAL_THEME_PREFS
gPrefs->Read( wxT("/GUI/ShowMac"), &bUseAqua, false);
#endif
#ifdef USE_AQUA_THEME
bUseAqua = !bUseAqua;
#endif
if( bUseAqua ){
MakeMacRecoloredImage( bmpRecoloredUpLarge, bmpMacUpButton );
MakeMacRecoloredImage( bmpRecoloredDownLarge, bmpMacDownButton );
MakeMacRecoloredImage( bmpRecoloredHiliteLarge, bmpMacHiliteButton );
} else {
MakeRecoloredImage( bmpRecoloredUpLarge, bmpUpButtonLarge );
MakeRecoloredImage( bmpRecoloredDownLarge, bmpDownButtonLarge );
MakeRecoloredImage( bmpRecoloredHiliteLarge, bmpHiliteButtonLarge );
}
}
void ToolBar::MakeButtonBackgroundsSmall()
{
#ifdef USE_AQUA_THEME
MakeMacRecoloredImage( bmpRecoloredUpSmall, bmpMacUpButtonSmall );
MakeMacRecoloredImage( bmpRecoloredDownSmall, bmpMacDownButtonSmall );
MakeMacRecoloredImage( bmpRecoloredHiliteSmall, bmpMacHiliteButtonSmall );
#else
MakeRecoloredImage( bmpRecoloredUpSmall, bmpUpButtonSmall );
MakeRecoloredImage( bmpRecoloredDownSmall, bmpDownButtonSmall );
MakeRecoloredImage( bmpRecoloredHiliteSmall, bmpHiliteButtonSmall );
bool bUseAqua = false;
#ifdef EXPERIMENTAL_THEME_PREFS
gPrefs->Read( wxT("/GUI/ShowMac"), &bUseAqua, false);
#endif
#ifdef USE_AQUA_THEME
bUseAqua = !bUseAqua;
#endif
if( bUseAqua ){
MakeMacRecoloredImage( bmpRecoloredUpSmall, bmpMacUpButtonSmall );
MakeMacRecoloredImage( bmpRecoloredDownSmall, bmpMacDownButtonSmall );
MakeMacRecoloredImage( bmpRecoloredHiliteSmall, bmpMacHiliteButtonSmall );
} else {
MakeRecoloredImage( bmpRecoloredUpSmall, bmpUpButtonSmall );
MakeRecoloredImage( bmpRecoloredDownSmall, bmpDownButtonSmall );
MakeRecoloredImage( bmpRecoloredHiliteSmall, bmpHiliteButtonSmall );
}
}
/// Makes a button and its four different state bitmaps