Update Sync-Lock icons on toolbar, TrackInfo; add the ability to have
a different foreground icon when a toolbar button is pressed (which will likely be used soon for the Sync-Lock icon).
This commit is contained in:
parent
1fbf7136cb
commit
2499082baa
|
@ -141,7 +141,8 @@ from there. Audacity will look for a file called "Pause.png".
|
|||
DEFINE_IMAGE( bmpRedo, wxImage( 26, 24 ), wxT("Redo"));
|
||||
DEFINE_IMAGE( bmpRedoDisabled, wxImage( 26, 24 ), wxT("RedoDisabled"));
|
||||
|
||||
DEFINE_IMAGE( bmpSyncLockTracks, wxImage( 20, 20 ), wxT("SyncLockTracks"));
|
||||
DEFINE_IMAGE( bmpSyncLockTracksDown, wxImage( 20, 20 ), wxT("SyncLockTracksDown"));
|
||||
DEFINE_IMAGE( bmpSyncLockTracksUp, wxImage( 20, 20 ), wxT("SyncLockTracksUp"));
|
||||
DEFINE_IMAGE( bmpSyncLockTracksDisabled, wxImage( 20, 20 ), wxT("SyncLockTracksDisabled"));
|
||||
|
||||
|
||||
|
|
8091
src/ThemeAsCeeCode.h
8091
src/ThemeAsCeeCode.h
File diff suppressed because it is too large
Load Diff
|
@ -122,14 +122,14 @@ void ControlToolBar::Create(wxWindow * parent)
|
|||
|
||||
// This is a convenience function that allows for button creation in
|
||||
// MakeButtons() with fewer arguments
|
||||
AButton *ControlToolBar::MakeButton(teBmps eFore, teBmps eDisabled,
|
||||
AButton *ControlToolBar::MakeButton(teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled,
|
||||
int id,
|
||||
bool processdownevents,
|
||||
const wxChar *label)
|
||||
{
|
||||
AButton *r = ToolBar::MakeButton(
|
||||
bmpRecoloredUpLarge, bmpRecoloredDownLarge, bmpRecoloredHiliteLarge,
|
||||
eFore, eDisabled,
|
||||
eEnabledUp, eEnabledDown, eDisabled,
|
||||
wxWindowID(id),
|
||||
wxDefaultPosition, processdownevents,
|
||||
theTheme.ImageSize( bmpRecoloredUpLarge ));
|
||||
|
@ -166,27 +166,27 @@ void ControlToolBar::Populate()
|
|||
{
|
||||
MakeButtonBackgroundsLarge();
|
||||
|
||||
mPause = MakeButton(bmpPause,bmpPauseDisabled,
|
||||
mPause = MakeButton(bmpPause, bmpPause, bmpPauseDisabled,
|
||||
ID_PAUSE_BUTTON, true, _("Pause"));
|
||||
|
||||
mPlay = MakeButton( bmpPlay, bmpPlayDisabled,
|
||||
mPlay = MakeButton( bmpPlay, bmpPlay, bmpPlayDisabled,
|
||||
ID_PLAY_BUTTON, true, _("Play"));
|
||||
|
||||
MakeLoopImage();
|
||||
|
||||
mStop = MakeButton( bmpStop, bmpStopDisabled ,
|
||||
mStop = MakeButton( bmpStop, bmpStop, bmpStopDisabled ,
|
||||
ID_STOP_BUTTON, false, _("Stop"));
|
||||
|
||||
mRewind = MakeButton(bmpRewind, bmpRewindDisabled,
|
||||
mRewind = MakeButton(bmpRewind, bmpRewind, bmpRewindDisabled,
|
||||
ID_REW_BUTTON, false, _("Start"));
|
||||
|
||||
mFF = MakeButton(bmpFFwd, bmpFFwdDisabled,
|
||||
mFF = MakeButton(bmpFFwd, bmpFFwd, bmpFFwdDisabled,
|
||||
ID_FF_BUTTON, false, _("End"));
|
||||
|
||||
mRecord = MakeButton(bmpRecord, bmpRecordDisabled,
|
||||
mRecord = MakeButton(bmpRecord, bmpRecord, bmpRecordDisabled,
|
||||
ID_RECORD_BUTTON, true, _("Record"));
|
||||
|
||||
mBatch = MakeButton(bmpCleanSpeech,bmpCleanSpeechDisabled,
|
||||
mBatch = MakeButton(bmpCleanSpeech, bmpCleanSpeech, bmpCleanSpeechDisabled,
|
||||
ID_BATCH_BUTTON, false, _("Clean Speech"));
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
|
|
|
@ -83,7 +83,7 @@ class ControlToolBar:public ToolBar {
|
|||
|
||||
private:
|
||||
|
||||
AButton *MakeButton(teBmps eFore, teBmps eDisabled,
|
||||
AButton *MakeButton(teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled,
|
||||
int id,
|
||||
bool processdownevents,
|
||||
const wxChar *label);
|
||||
|
|
|
@ -98,7 +98,7 @@ void EditToolBar::AddSeparator()
|
|||
/// MakeButtons() with fewer arguments
|
||||
/// Very similar to code in ControlToolBar...
|
||||
AButton *EditToolBar::AddButton(
|
||||
teBmps eFore, teBmps eDisabled,
|
||||
teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled,
|
||||
int id,
|
||||
const wxChar *label,
|
||||
bool toggle)
|
||||
|
@ -107,7 +107,7 @@ AButton *EditToolBar::AddButton(
|
|||
|
||||
r = ToolBar::MakeButton(
|
||||
bmpRecoloredUpSmall, bmpRecoloredDownSmall, bmpRecoloredHiliteSmall,
|
||||
eFore, eDisabled,
|
||||
eEnabledUp, eEnabledDown, eDisabled,
|
||||
wxWindowID(id),
|
||||
wxDefaultPosition,
|
||||
toggle,
|
||||
|
@ -127,41 +127,41 @@ void EditToolBar::Populate()
|
|||
MakeButtonBackgroundsSmall();
|
||||
|
||||
/* Buttons */
|
||||
AddButton(bmpCut, bmpCutDisabled, ETBCutID,
|
||||
AddButton(bmpCut, bmpCut, bmpCutDisabled, ETBCutID,
|
||||
_("Cut"));
|
||||
AddButton(bmpCopy, bmpCopyDisabled, ETBCopyID,
|
||||
AddButton(bmpCopy, bmpCopy, bmpCopyDisabled, ETBCopyID,
|
||||
_("Copy"));
|
||||
AddButton(bmpPaste, bmpPasteDisabled, ETBPasteID,
|
||||
AddButton(bmpPaste, bmpPaste, bmpPasteDisabled, ETBPasteID,
|
||||
_("Paste"));
|
||||
AddButton(bmpTrim, bmpTrimDisabled, ETBTrimID,
|
||||
AddButton(bmpTrim, bmpTrim, bmpTrimDisabled, ETBTrimID,
|
||||
_("Trim outside selection"));
|
||||
AddButton(bmpSilence, bmpSilenceDisabled, ETBSilenceID,
|
||||
AddButton(bmpSilence, bmpSilence, bmpSilenceDisabled, ETBSilenceID,
|
||||
_("Silence selection"));
|
||||
|
||||
AddSeparator();
|
||||
|
||||
AddButton(bmpUndo, bmpUndoDisabled, ETBUndoID,
|
||||
AddButton(bmpUndo, bmpUndo, bmpUndoDisabled, ETBUndoID,
|
||||
_("Undo"));
|
||||
AddButton(bmpRedo, bmpRedoDisabled, ETBRedoID,
|
||||
AddButton(bmpRedo, bmpRedo, bmpRedoDisabled, ETBRedoID,
|
||||
_("Redo"));
|
||||
|
||||
AddSeparator();
|
||||
|
||||
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||
AddButton(bmpSyncLockTracks, bmpSyncLockTracksDisabled, ETBSyncLockID,
|
||||
AddButton(bmpSyncLockTracksUp, bmpSyncLockTracksDown, bmpSyncLockTracksDisabled, ETBSyncLockID,
|
||||
_("Sync-Lock Tracks"), true);
|
||||
|
||||
AddSeparator();
|
||||
#endif
|
||||
|
||||
AddButton(bmpZoomIn, bmpZoomInDisabled, ETBZoomInID,
|
||||
AddButton(bmpZoomIn, bmpZoomIn, bmpZoomInDisabled, ETBZoomInID,
|
||||
_("Zoom In"));
|
||||
AddButton(bmpZoomOut, bmpZoomOutDisabled, ETBZoomOutID,
|
||||
AddButton(bmpZoomOut, bmpZoomOut, bmpZoomOutDisabled, ETBZoomOutID,
|
||||
_("Zoom Out"));
|
||||
|
||||
AddButton(bmpZoomSel, bmpZoomSelDisabled, ETBZoomSelID,
|
||||
AddButton(bmpZoomSel, bmpZoomSel, bmpZoomSelDisabled, ETBZoomSelID,
|
||||
_("Fit selection in window"));
|
||||
AddButton(bmpZoomFit, bmpZoomFitDisabled, ETBZoomFitID,
|
||||
AddButton(bmpZoomFit, bmpZoomFit, bmpZoomFitDisabled, ETBZoomFitID,
|
||||
_("Fit project in window"));
|
||||
|
||||
mButtons[ETBZoomInID]->SetEnabled(false);
|
||||
|
|
|
@ -72,7 +72,7 @@ class EditToolBar:public ToolBar {
|
|||
|
||||
private:
|
||||
|
||||
AButton *AddButton(teBmps eFore, teBmps eDisabled,
|
||||
AButton *AddButton(teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled,
|
||||
int id, const wxChar *label, bool toggle = false);
|
||||
|
||||
void AddSeparator();
|
||||
|
|
|
@ -458,31 +458,33 @@ void ToolBar::MakeButtonBackgroundsSmall()
|
|||
}
|
||||
|
||||
/// Makes a button and its four different state bitmaps
|
||||
/// @param eUp Background for when button is Up.
|
||||
/// @param eDown Background for when button is Down.
|
||||
/// @param eHilite Background for when button is Hilit.
|
||||
/// @param eStandard Foreground when enabled.
|
||||
/// @param eDisabled Foreground when disabled.
|
||||
/// @param id Windows Id.
|
||||
/// @param placement Placement position
|
||||
/// @param eUp Background for when button is Up.
|
||||
/// @param eDown Background for when button is Down.
|
||||
/// @param eHilite Background for when button is Hilit.
|
||||
/// @param eStandardUp Foreground when enabled, up.
|
||||
/// @param eStandardDown Foregrounde when enabled, down.
|
||||
/// @param eDisabled Foreground when disabled.
|
||||
/// @param id Windows Id.
|
||||
/// @param placement Placement position
|
||||
/// @param processdownevents true iff button handles down events.
|
||||
/// @param size Size of the background.
|
||||
/// @param size Size of the background.
|
||||
AButton * ToolBar::MakeButton(teBmps eUp,
|
||||
teBmps eDown,
|
||||
teBmps eHilite,
|
||||
teBmps eStandard,
|
||||
teBmps eStandardUp,
|
||||
teBmps eStandardDown,
|
||||
teBmps eDisabled,
|
||||
wxWindowID id,
|
||||
wxPoint placement,
|
||||
bool processdownevents,
|
||||
wxSize size)
|
||||
{
|
||||
int xoff = (size.GetWidth() - theTheme.Image(eStandard).GetWidth())/2;
|
||||
int yoff = (size.GetHeight() - theTheme.Image(eStandard).GetHeight())/2;
|
||||
int xoff = (size.GetWidth() - theTheme.Image(eStandardUp).GetWidth())/2;
|
||||
int yoff = (size.GetHeight() - theTheme.Image(eStandardUp).GetHeight())/2;
|
||||
|
||||
wxImage * up2 = OverlayImage(eUp, eStandard, xoff, yoff);
|
||||
wxImage * hilite2 = OverlayImage(eHilite, eStandard, xoff, yoff);
|
||||
wxImage * down2 = OverlayImage(eDown, eStandard, xoff + 1, yoff + 1);
|
||||
wxImage * up2 = OverlayImage(eUp, eStandardUp, xoff, yoff);
|
||||
wxImage * hilite2 = OverlayImage(eHilite, eStandardUp, xoff, yoff);
|
||||
wxImage * down2 = OverlayImage(eDown, eStandardDown, xoff + 1, yoff + 1);
|
||||
wxImage * disable2 = OverlayImage(eUp, eDisabled, xoff, yoff);
|
||||
|
||||
AButton * button =
|
||||
|
@ -553,7 +555,7 @@ void ToolBar::OnPaint( wxPaintEvent & event )
|
|||
int y;
|
||||
for(y=0;y<sz.y;y++)
|
||||
{
|
||||
int yPix = ((float)y * imSz.y - 0.0001f)/(sz.y-1);
|
||||
int yPix = ((float)y * imSz.y - 1.0f)/(sz.y-1);
|
||||
wxColour col(
|
||||
mpBackGradient->GetRed( 0, yPix),
|
||||
mpBackGradient->GetGreen( 0, yPix),
|
||||
|
|
|
@ -105,7 +105,8 @@ class ToolBar:public wxPanel
|
|||
AButton *MakeButton(teBmps eUp,
|
||||
teBmps eDown,
|
||||
teBmps eHilite,
|
||||
teBmps eStandard,
|
||||
teBmps eStandardUp,
|
||||
teBmps eStandardDown,
|
||||
teBmps eDisabled,
|
||||
wxWindowID id,
|
||||
wxPoint placement,
|
||||
|
|
|
@ -166,7 +166,7 @@ AButton * ToolsToolBar::MakeTool( teBmps eTool,
|
|||
{
|
||||
AButton *button = ToolBar::MakeButton(
|
||||
bmpRecoloredUpSmall, bmpRecoloredDownSmall, bmpRecoloredHiliteSmall,
|
||||
eTool, eTool,
|
||||
eTool, eTool, eTool,
|
||||
wxWindowID(id),
|
||||
wxDefaultPosition, true,
|
||||
theTheme.ImageSize( bmpRecoloredUpSmall ));
|
||||
|
|
|
@ -145,7 +145,7 @@ AButton *TranscriptionToolBar::AddButton(
|
|||
|
||||
r = ToolBar::MakeButton(
|
||||
bmpRecoloredUpSmall, bmpRecoloredDownSmall, bmpRecoloredHiliteSmall,
|
||||
eFore, eDisabled,
|
||||
eFore, eFore, eDisabled,
|
||||
wxWindowID(id),
|
||||
wxDefaultPosition,
|
||||
false,
|
||||
|
|
Loading…
Reference in New Issue