Theme Tweaks

- Highlighting of Buttons in TCP and Sliders
- No crinkly Help Icon anymore
- Invisible numbers in NoteTrack fixed
- Better visibility of label track dragger elements
- Theme rearranged more logically, and dead images culled
This commit is contained in:
James Crook 2017-07-19 15:25:29 +01:00
parent c1c19774b4
commit 60405eb7fe
10 changed files with 12793 additions and 13136 deletions

View File

@ -237,8 +237,17 @@ void AColor::Bevel2
(wxDC & dc, bool up, const wxRect & r, bool bSel, bool bHighlight)
{
int index = 0;
if ( bHighlight )
index = up ? bmpHiliteButtonExpand : bmpHiliteButtonExpandSel;
// There are eight button states in the TCP.
// A theme might not differentiate between them all. That's up to
// the theme designer.
// Button highlighted (i.e. hovered over) or not.
// Track selected or not
// Button up or down.
// Highlight in most themes is lighter than not highlighted.
if ( bHighlight && bSel)
index = up ? bmpHiliteUpButtonExpandSel : bmpHiliteButtonExpandSel;
else if ( bHighlight )
index = up ? bmpHiliteUpButtonExpand : bmpHiliteButtonExpand;
else if( bSel )
index = up ? bmpUpButtonExpandSel : bmpDownButtonExpandSel;
else
@ -541,6 +550,7 @@ void AColor::Init()
inited = true;
}
// These colours are chosen so that black text shows up OK on them.
const int AColor_midicolors[16][3] = {
{255, 102, 102}, // 1=salmon
{204, 0, 0}, // 2=red
@ -548,7 +558,7 @@ const int AColor_midicolors[16][3] = {
{255, 255, 0}, // 4=yellow
{0, 204, 0}, // 5=green
{0, 204, 204}, // 6=turquoise
{0, 0, 204}, // 7=blue
{125, 125, 255}, // 7=blue
{153, 0, 255}, // 8=blue-violet
{140, 97, 54}, // 9=brown
@ -556,7 +566,7 @@ const int AColor_midicolors[16][3] = {
{255, 175, 40}, // 11=lt orange
{102, 255, 102}, // 12=lt green
{153, 255, 255}, // 13=lt turquoise
{153, 153, 255}, // 14=lt blue
{190, 190, 255}, // 14=lt blue
{204, 102, 255}, // 15=lt blue-violet
{255, 51, 204} // 16=lt red-violet
};

View File

@ -55,6 +55,8 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_IMAGE( bmpPlayDisabled, wxImage( 16, 16 ), wxT("PlayDisabled"));
DEFINE_IMAGE( bmpLoop, wxImage( 16, 16 ), wxT("Loop"));
DEFINE_IMAGE( bmpLoopDisabled, wxImage( 16, 16 ), wxT("LoopDisabled"));
DEFINE_IMAGE( bmpCutPreview, wxImage( 16, 16 ), wxT("CutPreview"));
DEFINE_IMAGE( bmpCutPreviewDisabled, wxImage( 16, 16 ), wxT("CutPreviewDisabled"));
DEFINE_IMAGE( bmpStop, wxImage( 16, 16 ), wxT("Stop"));
DEFINE_IMAGE( bmpStopDisabled, wxImage( 16, 16 ), wxT("StopDisabled"));
DEFINE_IMAGE( bmpRewind, wxImage( 16, 16 ), wxT("Rewind"));
@ -63,19 +65,17 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_IMAGE( bmpFFwdDisabled, wxImage( 16, 16 ), wxT("FFwdDisabled"));
DEFINE_IMAGE( bmpRecord, wxImage( 16, 16 ), wxT("Record"));
DEFINE_IMAGE( bmpRecordDisabled, wxImage( 16, 16 ), wxT("RecordDisabled"));
DEFINE_IMAGE( bmpCutPreview, wxImage( 16, 16 ), wxT("CutPreview"));
DEFINE_IMAGE( bmpCutPreviewDisabled, wxImage( 16, 16 ), wxT("CutPreviewDisabled"));
DEFINE_IMAGE( bmpRecordBeside, wxImage( 16, 16 ), wxT("RecordBeside"));
DEFINE_IMAGE( bmpRecordBesideDisabled, wxImage( 16, 16 ), wxT("RecordBesideDisabled"));
DEFINE_IMAGE( bmpRecordBelow, wxImage( 16, 16 ), wxT("RecordBelow"));
DEFINE_IMAGE( bmpRecordBelowDisabled, wxImage( 16, 16 ), wxT("RecordBelowDisabled"));
DEFINE_IMAGE( bmpScrub, wxImage( 18, 16 ), wxT("Scrub"));
DEFINE_IMAGE( bmpScrubDisabled, wxImage( 18, 16 ), wxT("ScrubDisabled"));
DEFINE_IMAGE( bmpSeek, wxImage( 26, 16 ), wxT("Seek"));
DEFINE_IMAGE( bmpSeekDisabled, wxImage( 26, 16 ), wxT("SeekDisabled"));
DEFINE_IMAGE( bmpRecordBeside, wxImage( 16, 16 ), wxT("RecordBeside"));
DEFINE_IMAGE( bmpRecordBesideDisabled, wxImage( 16, 16 ), wxT("RecordBesideDisabled"));
SET_THEME_FLAGS( resFlagNone );
SET_THEME_FLAGS( resFlagNewLine );
DEFINE_IMAGE( bmpIBeam, wxImage( 27, 27 ), wxT("IBeam"));
DEFINE_IMAGE( bmpZoom, wxImage( 27, 27 ), wxT("Zoom"));
DEFINE_IMAGE( bmpEnvelope, wxImage( 27, 27 ), wxT("Envelope"));
@ -148,87 +148,70 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_IMAGE( bmpLabelGlyph11, wxImage( 15, 23 ), wxT("LabelGlyph11"));
SET_THEME_FLAGS( resFlagNewLine );
DEFINE_IMAGE( bmpPostfishHome, wxImage( 19, 17 ), wxT("PostfishHome"));
DEFINE_IMAGE( bmpPostfishFastRewind, wxImage( 17, 17 ), wxT("PostfishFastRewind"));
DEFINE_IMAGE( bmpPostfishRewind, wxImage( 18, 17 ), wxT("PostfishRewind"));
DEFINE_IMAGE( bmpPostfishPlay, wxImage( 29, 17 ), wxT("PostfishPlay"));
DEFINE_IMAGE( bmpPostfishForward, wxImage( 18, 17 ), wxT("PostfishForward"));
DEFINE_IMAGE( bmpPostfishFastForward, wxImage( 17, 17 ), wxT("PostfishFastForward"));
DEFINE_IMAGE( bmpPostfishEnd, wxImage( 19, 17 ), wxT("PostfishEnd"));
DEFINE_IMAGE( bmpPostfishLoop, wxImage( 29, 17 ), wxT("PostfishLoop"));
SET_THEME_FLAGS( resFlagNone );
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpDockDown, wxImage( 15, 55 ), wxT("DockDown"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpDockDownShort, wxImage( 15, 27 ), wxT("DockDownShort"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpDockOver, wxImage( 15, 55 ), wxT("DockOver"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpDockOverShort, wxImage( 15, 27 ), wxT("DockOverShort"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpDockUp, wxImage( 15, 55 ), wxT("DockUp"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpDockUpShort, wxImage( 15, 27 ), wxT("DockUpShort"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpPinnedPlayRecordHead, wxImage( 27, 27 ), wxT("PinnedPlayRecordHead"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpUnpinnedPlayRecordHead, wxImage( 27, 27 ), wxT("UnpinnedPlayRecordHead"));
DEFINE_IMAGE( bmpSyncLockSelTile, wxImage(20, 22), wxT("SyncLockSelTile"));
DEFINE_IMAGE( bmpEditEffects, wxImage(21, 20), wxT("EditEffects"));
DEFINE_IMAGE( bmpSyncLockTracksDown, wxImage( 20, 20 ), wxT("SyncLockTracksDown"));
DEFINE_IMAGE( bmpSyncLockTracksUp, wxImage( 20, 20 ), wxT("SyncLockTracksUp"));
DEFINE_IMAGE( bmpSyncLockTracksDisabled, wxImage( 20, 20 ), wxT("SyncLockTracksDisabled"));
DEFINE_IMAGE( bmpToggleScrubRuler, wxImage( 20, 20 ), wxT("ToggleScrubRuler"));
DEFINE_IMAGE( bmpSyncLockIcon, wxImage(12, 12), wxT("SyncLockIcon"));
DEFINE_IMAGE( bmpEditEffects, wxImage(21, 20), wxT("EditEffects"));
DEFINE_IMAGE( bmpToggleScrubRuler, wxImage( 20, 20 ), wxT("ToggleScrubRuler"));
DEFINE_IMAGE( bmpHelpIcon, wxImage( 21, 21 ), wxT("HelpIcon"));
SET_THEME_FLAGS( resFlagNewLine );
SET_THEME_FLAGS( resFlagNone );
DEFINE_IMAGE( bmpPlayPointer, wxImage( 20, 20 ), wxT("PlayPointer"));
DEFINE_IMAGE( bmpPlayPointerPinned, wxImage( 20, 20 ), wxT("PlayPointerPinned"));
DEFINE_IMAGE( bmpRecordPointer, wxImage( 20, 20 ), wxT("RecordPointer"));
DEFINE_IMAGE( bmpRecordPointerPinned, wxImage( 20, 20 ), wxT("RecordPointerPinned"));
DEFINE_IMAGE( bmpGrabberDropLoc, wxImage( 20, 20 ), wxT("GrabberDropLoc"));
DEFINE_IMAGE( bmpSliderThumbRotated, wxImage( 20, 11 ), wxT("SliderThumbRotated"));
DEFINE_IMAGE( bmpSliderThumbRotatedHilited, wxImage( 20, 11 ), wxT("SliderThumbRotatedHilited"));
DEFINE_IMAGE( bmpSliderThumb, wxImage( 20, 20 ), wxT("SliderThumb"));
DEFINE_IMAGE( bmpSliderThumbHilited, wxImage( 20, 20 ), wxT("SliderThumbHilited"));
DEFINE_IMAGE( bmpSliderThumbRotated, wxImage( 20, 20 ), wxT("SliderThumbRotated"));
DEFINE_IMAGE( bmpSliderThumbRotatedHilited, wxImage( 20, 20 ), wxT("SliderThumbRotatedHilited"));
SET_THEME_FLAGS( resFlagNone );
DEFINE_IMAGE( bmpSliderThumb, wxImage( 11, 20 ), wxT("SliderThumb"));
DEFINE_IMAGE( bmpSliderThumbHilited, wxImage( 11, 20 ), wxT("SliderThumbHilited"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpSlider, wxImage( 80, 20 ), wxT("Slider"));
SET_THEME_FLAGS( resFlagSkip );
DEFINE_IMAGE( bmpHiliteSlider, wxImage( 80, 20 ), wxT("HiliteSlider"));
DEFINE_IMAGE( bmpUpButtonExpandSel, wxImage( 96, 18 ), wxT("UpButtonExpandSel"));
DEFINE_IMAGE( bmpDownButtonExpandSel, wxImage( 96, 18 ), wxT("DownButtonExpandSel"));
SET_THEME_FLAGS( resFlagNewLine );
DEFINE_IMAGE( bmpUpButtonExpand, wxImage( 96, 18 ), wxT("UpButtonExpand"));
DEFINE_IMAGE( bmpDownButtonExpand, wxImage( 96, 18 ), wxT("DownButtonExpand"));
DEFINE_IMAGE( bmpHiliteUpButtonExpand, wxImage( 96, 18 ), wxT("HiliteUpButtonExpand"));
DEFINE_IMAGE( bmpHiliteButtonExpand, wxImage( 96, 18 ), wxT("HiliteButtonExpand"));
DEFINE_IMAGE( bmpHiliteButtonExpandSel, wxImage( 96, 18 ), wxT("HiliteButtonExpandSel"));
SET_THEME_FLAGS( resFlagNewLine );
DEFINE_IMAGE( bmpUpButtonLarge, wxImage( 48, 48 ), wxT("UpButtonLarge"));
DEFINE_IMAGE( bmpDownButtonLarge, wxImage( 48, 48 ), wxT("DownButtonLarge"));
DEFINE_IMAGE( bmpHiliteButtonLarge, wxImage( 48, 48 ), wxT("HiliteButtonLarge"));
DEFINE_IMAGE( bmpUpButtonSmall, wxImage( 27, 27 ), wxT("UpButtonSmall"));
DEFINE_IMAGE( bmpDownButtonSmall, wxImage( 27, 27 ), wxT("DownButtonSmall"));
DEFINE_IMAGE( bmpHiliteButtonSmall, wxImage( 27, 27 ), wxT("HiliteButtonSmall"));
DEFINE_IMAGE( bmpUpButtonExpandSel, wxImage( 96, 18 ), wxT("UpButtonExpandSel"));
DEFINE_IMAGE( bmpDownButtonExpandSel, wxImage( 96, 18 ), wxT("DownButtonExpandSel"));
DEFINE_IMAGE( bmpHiliteUpButtonExpandSel, wxImage( 96, 18 ), wxT("HiliteUpButtonExpandSel"));
DEFINE_IMAGE( bmpHiliteButtonExpandSel, wxImage( 96, 18 ), wxT("HiliteButtonExpandSel"));
SET_THEME_FLAGS( resFlagNone );
DEFINE_IMAGE( bmpUpButtonLarge, wxImage( 48, 48 ), wxT("UpButtonLarge"));
DEFINE_IMAGE( bmpDownButtonLarge, wxImage( 48, 48 ), wxT("DownButtonLarge"));
DEFINE_IMAGE( bmpHiliteUpButtonLarge, wxImage( 48, 48 ), wxT("HiliteUpButtonLarge"));
DEFINE_IMAGE( bmpHiliteButtonLarge, wxImage( 48, 48 ), wxT("HiliteButtonLarge"));
SET_THEME_FLAGS( resFlagNewLine );
DEFINE_IMAGE( bmpMacUpButton, wxImage( 36, 36 ), wxT("MacUpButton"));
DEFINE_IMAGE( bmpMacDownButton, wxImage( 36, 36 ), wxT("MacDownButton"));
DEFINE_IMAGE( bmpMacHiliteUpButton, wxImage( 36, 36 ), wxT("MacHiliteUpButton"));
DEFINE_IMAGE( bmpMacHiliteButton, wxImage( 36, 36 ), wxT("MacHiliteButton"));
SET_THEME_FLAGS( resFlagNone );
DEFINE_IMAGE( bmpUpButtonSmall, wxImage( 27, 27 ), wxT("UpButtonSmall"));
DEFINE_IMAGE( bmpDownButtonSmall, wxImage( 27, 27 ), wxT("DownButtonSmall"));
DEFINE_IMAGE( bmpHiliteUpButtonSmall, wxImage( 27, 27 ), wxT("HiliteUpButtonSmall"));
DEFINE_IMAGE( bmpHiliteButtonSmall, wxImage( 27, 27 ), wxT("HiliteButtonSmall"));
SET_THEME_FLAGS( resFlagNewLine );
DEFINE_IMAGE( bmpMacUpButtonSmall, wxImage( 27, 27 ), wxT("MacUpButtonSmall"));
DEFINE_IMAGE( bmpMacDownButtonSmall, wxImage( 27, 27 ), wxT("MacDownButtonSmall"));
DEFINE_IMAGE( bmpMacHiliteUpButtonSmall, wxImage( 27, 27 ), wxT("MacHiliteUpButtonSmall"));
DEFINE_IMAGE( bmpMacHiliteButtonSmall, wxImage( 27, 27 ), wxT("MacHiliteButtonSmall"));
SET_THEME_FLAGS( resFlagInternal );
DEFINE_IMAGE( bmpRecoloredUpLarge, wxImage( 48, 48 ), wxT("RecoloredUpLarge"));
DEFINE_IMAGE( bmpRecoloredDownLarge, wxImage( 48, 48 ), wxT("RecoloredDownLarge"));
DEFINE_IMAGE( bmpRecoloredUpHiliteLarge, wxImage( 48, 48 ), wxT("RecoloredUpHiliteLarge"));
DEFINE_IMAGE( bmpRecoloredHiliteLarge, wxImage( 48, 48 ), wxT("RecoloredHiliteLarge"));
DEFINE_IMAGE( bmpRecoloredUpSmall, wxImage( 27, 27 ), wxT("RecoloredUpSmall"));
DEFINE_IMAGE( bmpRecoloredDownSmall, wxImage( 27, 27 ), wxT("RecoloredDownSmall"));
DEFINE_IMAGE( bmpRecoloredUpHiliteSmall, wxImage( 27, 27 ), wxT("RecoloredUpHiliteSmall"));
DEFINE_IMAGE( bmpRecoloredHiliteSmall, wxImage( 27, 27 ), wxT("RecoloredHiliteSmall"));
SET_THEME_FLAGS( resFlagCursor );
@ -256,8 +239,7 @@ from there. Audacity will look for a file called "Pause.png".
#define LOGOWITHNAME_HEIGHT 200
SET_THEME_FLAGS( resFlagSkip | resFlagNewLine );
DEFINE_IMAGE( bmpAudacityLogo, wxImage( 215, 190 ), wxT("AudacityLogo"));
SET_THEME_FLAGS( resFlagNewLine );
DEFINE_IMAGE( bmpAudacityLogo48x48, wxImage( 48, 48 ), wxT("AudacityLogo48x48"));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -37,6 +37,7 @@
#include "InconsistencyException.h"
#include "TrackPanel.h" // For TrackInfo
#include "AllThemeResources.h"
#ifdef SONIFY
#include "../lib-src/portmidi/pm_common/portmidi.h"
@ -251,6 +252,7 @@ void NoteTrack::WarpAndTransposeNotes(double t0, double t1,
void NoteTrack::DrawLabelControls
( const NoteTrack *pTrack, wxDC & dc, const wxRect &rect, int highlightedChannel )
{
dc.SetTextForeground(theTheme.Colour(clrLabelTrackText));
wxASSERT_MSG(rect.width % 4 == 0, "Midi channel control rect width must be divisible by 4");
wxASSERT_MSG(rect.height % 4 == 0, "Midi channel control rect height must be divisible by 4");
@ -338,6 +340,7 @@ void NoteTrack::DrawLabelControls
dc.DrawText(text, box.x + (box.width - w) / 2, box.y + (box.height - h) / 2);
}
}
dc.SetTextForeground(theTheme.Colour(clrTrackPanelText));
AColor::MIDIChannel(&dc, 0); // always return with gray color selected
}

View File

@ -109,14 +109,10 @@ for registering for changes.
#include "Shuttle.h"
#include "WrappedType.h"
#include "widgets/wxPanelWrapper.h"
#include "../images/Help.xpm"
#include "AllThemeResources.h"
ShuttleGuiBase::ShuttleGuiBase(wxWindow * pParent, teShuttleMode ShuttleMode )
{
// Suppress warnings about the header file
wxUnusedVar(Help_xpm);
wxASSERT( (pParent != NULL ) || ( ShuttleMode != eIsCreating));
mpParent = pParent;
@ -2176,7 +2172,7 @@ std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wx
{
// Replace standard Help button with smaller icon button.
// bs->AddButton(safenew wxButton(parent, wxID_HELP));
b = new wxBitmapButton(parent, wxID_HELP, Help_xpm);
b = new wxBitmapButton(parent, wxID_HELP, theTheme.Bitmap( bmpHelpIcon ));
b->SetToolTip( _("Help") );
bs->AddButton( b );
}

View File

@ -536,6 +536,8 @@ void FlowPacker::GetNextPosition( int xSize, int ySize )
{
SetNewGroup( ((mFlags & resFlagPaired)!=0) ? 2 : 1 );
myHeight = ySize;
// mFlags &= ~resFlagNewLine;
// mOldFlags = mFlags;
}
iImageGroupIndex++;

View File

@ -556,10 +556,14 @@ void LWSlider::OnPaint(wxDC &dc, bool highlight)
//thumbPos should be in pixels
int thumbPos = ValueToPosition(mCurrentValue);
int thumbOrtho; // position in axis orthogonal to mOrientation
if (mOrientation == wxHORIZONTAL)
if (mOrientation == wxHORIZONTAL){
thumbOrtho = mCenterY - (mThumbHeight/2);
else
thumbPos += 3-mThumbWidth/2;
}
else{
thumbOrtho = mCenterX - (mThumbWidth/2);
thumbPos += 8-mThumbHeight/2;
}
#if !defined(__WXMAC__)
if( mHW )