mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-26 14:41:14 +01:00
Button and hover effect for microphone/speaker on meter bar.
Also fixed capitalisation of "Blend system and Audacity theme"
This commit is contained in:
@@ -188,7 +188,7 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.TieCheckBox(_("Re&tain labels if selection snaps to a label edge"),
|
S.TieCheckBox(_("Re&tain labels if selection snaps to a label edge"),
|
||||||
wxT("/GUI/RetainLabels"),
|
wxT("/GUI/RetainLabels"),
|
||||||
false);
|
false);
|
||||||
S.TieCheckBox(_("B&lend System and Audacity Theme"),
|
S.TieCheckBox(_("B&lend system and Audacity theme"),
|
||||||
wxT("/GUI/BlendThemes"),
|
wxT("/GUI/BlendThemes"),
|
||||||
true);
|
true);
|
||||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||||
|
|||||||
@@ -462,14 +462,9 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event))
|
|||||||
if (mStyle != MixerTrackCluster)
|
if (mStyle != MixerTrackCluster)
|
||||||
{
|
{
|
||||||
bool highlight = InIcon();
|
bool highlight = InIcon();
|
||||||
if (highlight) {
|
dc.DrawBitmap( theTheme.Bitmap( highlight ? bmpHiliteButtonSmall : bmpUpButtonSmall ),
|
||||||
auto rect = mIconRect;
|
mIconRect.GetPosition(), false );
|
||||||
rect.Inflate(gap, gap);
|
|
||||||
wxColour colour(247, 247, 247);
|
|
||||||
dc.SetBrush(colour);
|
|
||||||
dc.SetPen(colour );
|
|
||||||
dc.DrawRectangle(rect);
|
|
||||||
}
|
|
||||||
dc.DrawBitmap(*mIcon, mIconRect.GetPosition(), true);
|
dc.DrawBitmap(*mIcon, mIconRect.GetPosition(), true);
|
||||||
dc.SetFont(GetFont());
|
dc.SetFont(GetFont());
|
||||||
dc.SetTextForeground( clrText );
|
dc.SetTextForeground( clrText );
|
||||||
@@ -1411,8 +1406,8 @@ void Meter::HandleLayout(wxDC &dc)
|
|||||||
mRuler.OfflimitsPixels(0, 0);
|
mRuler.OfflimitsPixels(0, 0);
|
||||||
break;
|
break;
|
||||||
case HorizontalStereo:
|
case HorizontalStereo:
|
||||||
// Ensure there's a margin between left edge of window and items
|
// Button right next to dragger.
|
||||||
left = gap;
|
left = 0;
|
||||||
|
|
||||||
// Add a gap between bottom of icon and bottom of window
|
// Add a gap between bottom of icon and bottom of window
|
||||||
height -= gap;
|
height -= gap;
|
||||||
@@ -1422,6 +1417,7 @@ void Meter::HandleLayout(wxDC &dc)
|
|||||||
mIconRect.SetY(height - iconHeight);
|
mIconRect.SetY(height - iconHeight);
|
||||||
mIconRect.SetWidth(iconWidth);
|
mIconRect.SetWidth(iconWidth);
|
||||||
mIconRect.SetHeight(iconHeight);
|
mIconRect.SetHeight(iconHeight);
|
||||||
|
left = gap;
|
||||||
|
|
||||||
// Make sure there's room for icon and gap between the bottom of the meter and icon
|
// Make sure there's room for icon and gap between the bottom of the meter and icon
|
||||||
height -= iconHeight + gap;
|
height -= iconHeight + gap;
|
||||||
@@ -1466,15 +1462,16 @@ void Meter::HandleLayout(wxDC &dc)
|
|||||||
mRuler.OfflimitsPixels(0, mIconRect.GetRight() - 4);
|
mRuler.OfflimitsPixels(0, mIconRect.GetRight() - 4);
|
||||||
break;
|
break;
|
||||||
case HorizontalStereoCompact:
|
case HorizontalStereoCompact:
|
||||||
// Ensure there's a margin between left edge of window and items
|
// Button right next to dragger.
|
||||||
left = gap;
|
left = 0;
|
||||||
|
|
||||||
// Create icon rectangle
|
// Create icon rectangle
|
||||||
mIconRect.SetX(left);
|
mIconRect.SetX(left);
|
||||||
mIconRect.SetY((height - iconHeight) / 2);
|
mIconRect.SetY((height - iconHeight) / 2 -1);
|
||||||
mIconRect.SetWidth(iconWidth);
|
mIconRect.SetWidth(iconWidth);
|
||||||
mIconRect.SetHeight(iconHeight);
|
mIconRect.SetHeight(iconHeight);
|
||||||
|
|
||||||
|
left = gap;
|
||||||
// Add width of icon and gap between icon and L/R
|
// Add width of icon and gap between icon and L/R
|
||||||
left += iconWidth + gap;
|
left += iconWidth + gap;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user