Browse Source

Make zoom-fit menu item work.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
0645c0ebbf
3 changed files with 10 additions and 3 deletions
  1. +3
    -2
      Timeline/TLE.fl
  2. +6
    -0
      Timeline/Timeline.C
  3. +1
    -1
      Timeline/Timeline.H

+ 3
- 2
Timeline/TLE.fl View File

@@ -34,7 +34,7 @@ decl {\#include <FL/Fl.H>} {}
decl {extern char *user_config_dir;} {global
}

class TLE {open selected
class TLE {open
} {
decl {Fl_Color system_colors[3];} {public
}
@@ -114,7 +114,7 @@ free( path );} {}
label {Non-DAW - Timeline} open
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}
} {
Submenu {} {
@@ -227,6 +227,7 @@ exit( 0 );}
}
MenuItem {} {
label {&Fit}
callback {timeline->zoom_fit();} selected
xywh {10 10 40 25} divider
}
MenuItem {} {


+ 6
- 0
Timeline/Timeline.C View File

@@ -1073,6 +1073,12 @@ Timeline::zoom ( float secs )
redraw();
}

void
Timeline::zoom_fit ( void )
{
zoom( _length / (float)sample_rate() );
}

Track *
Timeline::track_by_name ( const char *name )
{


+ 1
- 1
Timeline/Timeline.H View File

@@ -181,7 +181,7 @@ public:
void zoom ( float secs );
void zoom_in ( void );
void zoom_out ( void );
void zoom_fit ( void );


private:


Loading…
Cancel
Save