Make zoom-fit menu item work.
This commit is contained in:
parent
0da462b62d
commit
0645c0ebbf
|
@ -34,7 +34,7 @@ decl {\#include <FL/Fl.H>} {}
|
||||||
decl {extern char *user_config_dir;} {global
|
decl {extern char *user_config_dir;} {global
|
||||||
}
|
}
|
||||||
|
|
||||||
class TLE {open selected
|
class TLE {open
|
||||||
} {
|
} {
|
||||||
decl {Fl_Color system_colors[3];} {public
|
decl {Fl_Color system_colors[3];} {public
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ free( path );} {}
|
||||||
label {Non-DAW - Timeline} open
|
label {Non-DAW - Timeline} open
|
||||||
xywh {577 94 1024 768} type Double resizable xclass {Non-DAW} visible
|
xywh {577 94 1024 768} type Double resizable xclass {Non-DAW} visible
|
||||||
} {
|
} {
|
||||||
Fl_Menu_Bar menubar {
|
Fl_Menu_Bar menubar {open
|
||||||
xywh {0 0 1024 25}
|
xywh {0 0 1024 25}
|
||||||
} {
|
} {
|
||||||
Submenu {} {
|
Submenu {} {
|
||||||
|
@ -227,6 +227,7 @@ exit( 0 );}
|
||||||
}
|
}
|
||||||
MenuItem {} {
|
MenuItem {} {
|
||||||
label {&Fit}
|
label {&Fit}
|
||||||
|
callback {timeline->zoom_fit();} selected
|
||||||
xywh {10 10 40 25} divider
|
xywh {10 10 40 25} divider
|
||||||
}
|
}
|
||||||
MenuItem {} {
|
MenuItem {} {
|
||||||
|
|
|
@ -1073,6 +1073,12 @@ Timeline::zoom ( float secs )
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Timeline::zoom_fit ( void )
|
||||||
|
{
|
||||||
|
zoom( _length / (float)sample_rate() );
|
||||||
|
}
|
||||||
|
|
||||||
Track *
|
Track *
|
||||||
Timeline::track_by_name ( const char *name )
|
Timeline::track_by_name ( const char *name )
|
||||||
{
|
{
|
||||||
|
|
|
@ -181,7 +181,7 @@ public:
|
||||||
void zoom ( float secs );
|
void zoom ( float secs );
|
||||||
void zoom_in ( void );
|
void zoom_in ( void );
|
||||||
void zoom_out ( void );
|
void zoom_out ( void );
|
||||||
|
void zoom_fit ( void );
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue