mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-28 14:18:41 +02:00
More hover highlighting of buttons in oddments script.
This commit is contained in:
parent
2088e44f03
commit
ab0d853d92
@ -64,6 +64,14 @@ def oddments_imagesA():
|
||||
do( "Drag: Id="+str( id) + " FromX=10 FromY=10" )
|
||||
capture( "Button" + str(id) +"Hover.png", "Transport" )
|
||||
do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" )
|
||||
for id in range( 11200, 11206 ):
|
||||
do( "Drag: Id="+str( id) + " FromX=10 FromY=10" )
|
||||
capture( "Button" + str(id) +"Hover.png", "Tools" )
|
||||
do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" )
|
||||
for id in range( 11300, 11312 ):
|
||||
do( "Drag: Id="+str( id) + " FromX=10 FromY=10" )
|
||||
capture( "Button" + str(id) +"Hover.png", "Edit" )
|
||||
do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" )
|
||||
|
||||
|
||||
def oddments_imagesB():
|
||||
@ -77,6 +85,6 @@ def oddments_imagesB():
|
||||
#Disable bringing to top, so as not to destroy quick play.
|
||||
capture( "QuikPlay001.png", "First_Track_Plus ToTop=0" )
|
||||
|
||||
#oddments_imagesA()
|
||||
oddments_imagesB()
|
||||
oddments_imagesA()
|
||||
#oddments_imagesB()
|
||||
|
||||
|
@ -141,12 +141,12 @@ class ControlToolBar final : public ToolBar {
|
||||
|
||||
enum
|
||||
{
|
||||
ID_PLAY_BUTTON = 11000,
|
||||
ID_RECORD_BUTTON,
|
||||
ID_PAUSE_BUTTON,
|
||||
ID_PAUSE_BUTTON = 11000,
|
||||
ID_PLAY_BUTTON,
|
||||
ID_STOP_BUTTON,
|
||||
ID_FF_BUTTON,
|
||||
ID_REW_BUTTON,
|
||||
ID_RECORD_BUTTON,
|
||||
BUTTON_COUNT,
|
||||
};
|
||||
|
||||
|
@ -69,8 +69,8 @@ const int SEPARATOR_WIDTH = 14;
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE( EditToolBar, ToolBar )
|
||||
EVT_COMMAND_RANGE( ETBCutID,
|
||||
ETBCutID + ETBNumButtons - 1,
|
||||
EVT_COMMAND_RANGE( ETBCutID+first_ETB_ID,
|
||||
ETBCutID+first_ETB_ID + ETBNumButtons - 1,
|
||||
wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
EditToolBar::OnButton )
|
||||
END_EVENT_TABLE()
|
||||
@ -110,7 +110,7 @@ AButton *EditToolBar::AddButton(
|
||||
r = ToolBar::MakeButton(pBar,
|
||||
bmpRecoloredUpSmall, bmpRecoloredDownSmall, bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
|
||||
eEnabledUp, eEnabledDown, eDisabled,
|
||||
wxWindowID(id),
|
||||
wxWindowID(id+first_ETB_ID),
|
||||
wxDefaultPosition,
|
||||
toggle,
|
||||
theTheme.ImageSize( bmpRecoloredUpSmall ));
|
||||
@ -291,7 +291,7 @@ void EditToolBar::ForAllButtons(int Action)
|
||||
|
||||
void EditToolBar::OnButton(wxCommandEvent &event)
|
||||
{
|
||||
int id = event.GetId();
|
||||
int id = event.GetId()-first_ETB_ID;
|
||||
// Be sure the pop-up happens even if there are exceptions, except for buttons which toggle.
|
||||
auto cleanup = finally( [&] { mButtons[id]->InteractionOver();});
|
||||
|
||||
|
@ -62,6 +62,8 @@ enum {
|
||||
ETBNumButtons
|
||||
};
|
||||
|
||||
const int first_ETB_ID = 11300;
|
||||
|
||||
// flags so 1,2,4,8 etc.
|
||||
enum {
|
||||
ETBActTooltips = 1,
|
||||
|
@ -67,8 +67,8 @@ IMPLEMENT_CLASS(ToolsToolBar, ToolBar);
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE(ToolsToolBar, ToolBar)
|
||||
EVT_COMMAND_RANGE(firstTool,
|
||||
lastTool,
|
||||
EVT_COMMAND_RANGE(firstTool+FirstToolID,
|
||||
lastTool+FirstToolID,
|
||||
wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
ToolsToolBar::OnTool)
|
||||
END_EVENT_TABLE()
|
||||
@ -165,7 +165,7 @@ AButton * ToolsToolBar::MakeTool(
|
||||
bmpRecoloredUpHiliteSmall,
|
||||
bmpRecoloredDownSmall, // Not bmpRecoloredHiliteSmall as down is inactive.
|
||||
eTool, eTool, eTool,
|
||||
wxWindowID(id),
|
||||
wxWindowID(id + FirstToolID),
|
||||
wxDefaultPosition, true,
|
||||
theTheme.ImageSize( bmpRecoloredUpSmall ));
|
||||
button->SetLabel( label );
|
||||
@ -250,7 +250,7 @@ int ToolsToolBar::GetDownTool()
|
||||
|
||||
void ToolsToolBar::OnTool(wxCommandEvent & evt)
|
||||
{
|
||||
mCurrentTool = evt.GetId() - firstTool;
|
||||
mCurrentTool = evt.GetId() - firstTool - FirstToolID;
|
||||
for (int i = 0; i < numTools; i++)
|
||||
if (i == mCurrentTool)
|
||||
mTool[i]->PushDown();
|
||||
|
@ -41,9 +41,11 @@ enum {
|
||||
numTools,
|
||||
|
||||
firstTool = selectTool,
|
||||
lastTool = multiTool
|
||||
lastTool = multiTool,
|
||||
};
|
||||
|
||||
const int FirstToolID = 11200;
|
||||
|
||||
class ToolsToolBar final : public ToolBar {
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user