diff options
author | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2015-02-15 18:26:15 +0000 |
---|---|---|
committer | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2015-03-09 19:17:52 +0000 |
commit | 99e15d94025b7ce9046b3e8d4c4e7b2e1635df7a (patch) | |
tree | cfc1bb06c286e304e390f3ced57eac2e5fbd5645 /gtk2_ardour/audio_clock.h | |
parent | 760e00b028f35937abc72695a02838372eb275a7 (diff) |
Make left-click on tempo/meter in main clock edit current tempo/meter
Diffstat (limited to 'gtk2_ardour/audio_clock.h')
-rw-r--r-- | gtk2_ardour/audio_clock.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h index f00b6db8ec..4602ce8efc 100644 --- a/gtk2_ardour/audio_clock.h +++ b/gtk2_ardour/audio_clock.h @@ -101,6 +101,17 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr virtual void build_ops_menu (); Gtk::Menu *ops_menu; + bool on_button_press_event (GdkEventButton *ev); + bool on_button_release_event(GdkEventButton *ev); + bool is_lower_layout_click(int y) const { + return y > upper_height + separator_height; + } + bool is_right_layout_click(int x) const { + return x > x_leading_padding + get_left_rect_width() + separator_height; + } + double get_left_rect_width() const { + return round (((get_width() - separator_height) * mode_based_info_ratio) + 0.5); + } private: Mode _mode; std::string _name; @@ -186,8 +197,6 @@ class AudioClock : public CairoWidget, public ARDOUR::SessionHandlePtr bool on_key_press_event (GdkEventKey *); bool on_key_release_event (GdkEventKey *); bool on_scroll_event (GdkEventScroll *ev); - bool on_button_press_event (GdkEventButton *ev); - bool on_button_release_event(GdkEventButton *ev); void on_style_changed (const Glib::RefPtr<Gtk::Style>&); void on_size_request (Gtk::Requisition* req); bool on_motion_notify_event (GdkEventMotion *ev); |