mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
A possible method for correctly sizing the editor controls, and a couple buttons fixed
git-svn-id: svn://localhost/trunk/ardour2@195 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
170d6b24ce
commit
d2b8a7f6bd
6 changed files with 21 additions and 11 deletions
|
|
@ -161,10 +161,10 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
|
|||
mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press));
|
||||
mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release));
|
||||
rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press));
|
||||
edit_group_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::edit_click));
|
||||
edit_group_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::edit_click), false);
|
||||
playlist_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::playlist_click));
|
||||
automation_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::automation_click));
|
||||
size_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::size_click));
|
||||
size_button.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::size_click), false);
|
||||
visual_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::visual_click));
|
||||
hide_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::hide_click));
|
||||
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
// edit_controls_hbox.pack_start (edit_controls_vbox, true, true);
|
||||
controls_layout.add (edit_controls_vbox);
|
||||
controls_layout.set_name ("EditControlsBase");
|
||||
controls_layout.signal_size_request().connect (mem_fun(*this, &Editor::set_layout_width), false);
|
||||
|
||||
controls_layout.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
|
||||
controls_layout.signal_button_release_event().connect (mem_fun(*this, &Editor::edit_controls_button_release));
|
||||
|
|
@ -476,12 +477,12 @@ Editor::Editor (AudioEngine& eng)
|
|||
edit_packer.set_homogeneous (false);
|
||||
edit_packer.set_name ("EditorWindow");
|
||||
|
||||
edit_packer.attach (edit_hscrollbar, 1, 2, 0, 1, FILL|EXPAND, FILL, 0, 0);
|
||||
edit_packer.attach (edit_hscrollbar, 1, 2, 0, 1, FILL|EXPAND, FILL, 0, 0);
|
||||
|
||||
edit_packer.attach (time_button_event_box, 0, 1, 1, 2, FILL, FILL, 0, 0);
|
||||
edit_packer.attach (time_canvas_event_box, 1, 2, 1, 2, FILL|EXPAND, FILL, 0, 0);
|
||||
|
||||
edit_packer.attach (controls_layout, 0, 1, 2, 3, FILL, FILL, 0, 0);
|
||||
edit_packer.attach (controls_layout, 0, 1, 2, 3, FILL, FILL|EXPAND, 0, 0);
|
||||
edit_packer.attach (track_canvas_event_box, 1, 2, 2, 3, FILL|EXPAND, FILL|EXPAND, 0, 0);
|
||||
edit_packer.attach (edit_vscrollbar, 2, 3, 2, 3, FILL, FILL|EXPAND, 0, 0);
|
||||
|
||||
|
|
@ -3923,3 +3924,12 @@ Editor::transport_punch_location()
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_layout_width(Gtk::Requisition *r)
|
||||
{
|
||||
edit_controls_vbox.check_resize();
|
||||
int w = edit_controls_vbox.get_width();
|
||||
cerr << "set_layout_width() called w = " << w << endl;
|
||||
controls_layout.set_size_request (w, -1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -642,6 +642,7 @@ class Editor : public PublicEditor
|
|||
Gtk::Adjustment horizontal_adjustment;
|
||||
|
||||
Gtk::Layout controls_layout;
|
||||
void set_layout_width(Gtk::Requisition *);
|
||||
|
||||
Gtk::HScrollbar edit_hscrollbar;
|
||||
bool edit_hscroll_dragging;
|
||||
|
|
|
|||
|
|
@ -227,8 +227,8 @@ Editor::route_list_reordered ()
|
|||
long order;
|
||||
int n;
|
||||
|
||||
for (n = 0, order = 0, i = rows.begin(); i != rows.end(); ++i, ++order) {
|
||||
TimeAxisView *tv = (*i)[route_display_columns.tv];
|
||||
for (n = 0, order = 0, i = rows.begin(); i != rows.end(); ++i, ++order) {
|
||||
TimeAxisView *tv = (*i)[route_display_columns.tv];
|
||||
AudioTimeAxisView* at;
|
||||
if (!ignore_route_list_reorder) {
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||
{
|
||||
gdouble ix1, ix2, iy1, iy2;
|
||||
effective_height = 0;
|
||||
|
||||
|
||||
if (control_parent) {
|
||||
control_parent->reorder_child (controls_frame, nth);
|
||||
} else {
|
||||
|
|
@ -193,10 +193,9 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||
parent->pack_start (controls_frame, false, false);
|
||||
parent->reorder_child (controls_frame, nth);
|
||||
}
|
||||
|
||||
controls_frame.show ();
|
||||
controls_ebox.show ();
|
||||
|
||||
|
||||
/* the coordinates used here are in the system of the
|
||||
item's parent ...
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ Gtkmm2ext::set_size_request_to_display_given_text (Gtk::Widget &w, const gchar *
|
|||
|
||||
{
|
||||
int height = 0;
|
||||
int width = 0;
|
||||
int width = 0;
|
||||
|
||||
w.ensure_style ();
|
||||
w.create_pango_layout(text)->get_pixel_size (width, height);
|
||||
w.create_pango_layout(text)->get_pixel_size (width, height);
|
||||
|
||||
height += vpadding;
|
||||
width += hpadding;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue