Improve appearance of disabled mixer toolbar sliders.
This commit is contained in:
parent
ac664e2fab
commit
2b270e7a13
|
@ -3,7 +3,7 @@ static const char * SliderThumbDisabled[] = {
|
|||
"11 14 7 1",
|
||||
" c None",
|
||||
". c #DEDEDE",
|
||||
"+ c #888888",
|
||||
"+ c #777777",
|
||||
"@ c #EEEEEE",
|
||||
"# c #C8C8C8",
|
||||
"$ c #999999",
|
||||
|
|
|
@ -3,7 +3,7 @@ static const char * SliderThumb_VerticalDisabled[] = {
|
|||
"14 11 7 1",
|
||||
" c None",
|
||||
". c #DEDEDE",
|
||||
"+ c #888888",
|
||||
"+ c #777777",
|
||||
"@ c #EEEEEE",
|
||||
"# c #C8C8C8",
|
||||
"$ c #F2F2F2",
|
||||
|
|
|
@ -150,6 +150,7 @@ void MixerToolBar::Populate()
|
|||
|
||||
// Show or hide the input slider based on whether it works
|
||||
mInputSlider->Enable(gAudioIO->InputMixerWorks());
|
||||
SetToolTips();
|
||||
|
||||
UpdateControls();
|
||||
|
||||
|
@ -227,6 +228,7 @@ void MixerToolBar::UpdatePrefs()
|
|||
|
||||
// Show or hide the input slider based on whether it works
|
||||
mInputSlider->Enable(gAudioIO->InputMixerWorks());
|
||||
SetToolTips();
|
||||
|
||||
// Layout the toolbar
|
||||
Layout();
|
||||
|
@ -379,6 +381,27 @@ void MixerToolBar::AdjustInputGain(int adj)
|
|||
UpdateControls();
|
||||
}
|
||||
|
||||
void MixerToolBar::SetToolTips()
|
||||
{
|
||||
#if wxUSE_TOOLTIPS
|
||||
if (mInputSlider->IsEnabled()) {
|
||||
mInputSlider->SetToolTip(_("Input Level Slider"));
|
||||
}
|
||||
else {
|
||||
mInputSlider->SetToolTip(
|
||||
_("Cannot control input level; use system mixer."));
|
||||
}
|
||||
|
||||
if (mOutputSlider->IsEnabled()) {
|
||||
mOutputSlider->SetToolTip(_("Output Level Slider"));
|
||||
}
|
||||
else {
|
||||
mOutputSlider->SetToolTip(
|
||||
_("Cannot control output level; use system mixer."));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
// version control system. Please do not modify past this point.
|
||||
//
|
||||
|
|
|
@ -54,6 +54,7 @@ class MixerToolBar:public ToolBar {
|
|||
private:
|
||||
|
||||
void InitializeMixerToolBar();
|
||||
void SetToolTips();
|
||||
|
||||
wxBitmap *mPlayBitmap;
|
||||
wxBitmap *mRecordBitmap;
|
||||
|
|
|
@ -678,10 +678,7 @@ void LWSlider::Draw()
|
|||
dc->Clear();
|
||||
|
||||
// Draw the line along which the thumb moves.
|
||||
if (mEnabled)
|
||||
AColor::Dark(dc, false);
|
||||
else
|
||||
AColor::Medium(dc, 0);
|
||||
AColor::Dark(dc, false);
|
||||
|
||||
if (mOrientation == wxHORIZONTAL)
|
||||
AColor::Line(*dc, mLeftX, mCenterY+1, mRightX+2, mCenterY+1);
|
||||
|
@ -699,8 +696,10 @@ void LWSlider::Draw()
|
|||
wxFont labelFont(sliderFontSize-3, wxSWISS, wxNORMAL, wxNORMAL);
|
||||
dc->SetFont(labelFont);
|
||||
|
||||
// Colors
|
||||
#ifdef EXPERIMENTAL_THEMING
|
||||
dc->SetTextForeground( theTheme.Colour( clrTrackPanelText ));
|
||||
|
||||
// TransparentColour should be same as clrTrackInfo.
|
||||
dc->SetTextBackground( theTheme.Colour( clrTrackInfo ) );
|
||||
dc->SetBackground( theTheme.Colour( clrTrackInfo ) );
|
||||
|
@ -710,7 +709,11 @@ void LWSlider::Draw()
|
|||
// background.
|
||||
dc->SetBackgroundMode( wxSOLID );
|
||||
#else
|
||||
dc->SetTextForeground( wxColour( 0,0,0) );
|
||||
if (mEnabled)
|
||||
dc->SetTextForeground( wxColour( 0,0,0) );
|
||||
else
|
||||
dc->SetTextForeground( wxColour(128, 128, 128));
|
||||
|
||||
dc->SetTextBackground( wxColour( 255,255,255));
|
||||
#endif
|
||||
|
||||
|
@ -726,7 +729,10 @@ void LWSlider::Draw()
|
|||
wxPen pen( theTheme.Colour( clrTrackPanelText ));
|
||||
dc->SetPen( pen );
|
||||
#else
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
if (mEnabled)
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
else
|
||||
dc->SetPen(wxColour(128, 128, 128));
|
||||
#endif
|
||||
if (mOrientation == wxHORIZONTAL)
|
||||
{
|
||||
|
@ -801,10 +807,7 @@ void LWSlider::Draw()
|
|||
else
|
||||
AColor::Line(*dc, mCenterX-tickLength, mTopY+p, mCenterX-1, mTopY+p); // ticks at left
|
||||
|
||||
if (mEnabled)
|
||||
AColor::Dark(dc, false);
|
||||
else
|
||||
AColor::Medium(dc, 0);
|
||||
AColor::Dark(dc, false);
|
||||
|
||||
if (mOrientation == wxHORIZONTAL)
|
||||
AColor::Line(*dc, mLeftX+p+1, mCenterY-tickLength+1, mLeftX+p+1, mCenterY-1); // ticks above
|
||||
|
|
Loading…
Reference in New Issue