Improve toolbar layout consistency
Directly pack Lua Script buttons into top-level table, use same size-constraints. Use consistent Lua Action button width, in particular for buttons 10..12. prefer "a" instead of "10" for default numeric label
This commit is contained in:
parent
c07db6d655
commit
605a87f402
@ -548,7 +548,6 @@ private:
|
||||
ArdourWidgets::ArdourButton error_alert_button;
|
||||
|
||||
ArdourWidgets::ArdourButton action_script_call_btn[MAX_LUA_ACTION_BUTTONS];
|
||||
Gtk::Table action_script_table;
|
||||
|
||||
Gtk::VBox alert_box;
|
||||
Gtk::Table editor_meter_table;
|
||||
|
@ -480,6 +480,10 @@ ARDOUR_UI::setup_transport ()
|
||||
button_height_size_group->add_widget (monitor_disk_button);
|
||||
button_height_size_group->add_widget (auto_input_button);
|
||||
|
||||
for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) {
|
||||
button_height_size_group->add_widget (action_script_call_btn[i]);
|
||||
}
|
||||
|
||||
Glib::RefPtr<SizeGroup> clock1_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
|
||||
clock1_size_group->add_widget (*primary_clock->left_btn());
|
||||
clock1_size_group->add_widget (*primary_clock->right_btn());
|
||||
@ -583,8 +587,12 @@ ARDOUR_UI::setup_transport ()
|
||||
++col;
|
||||
|
||||
/* lua script action buttons */
|
||||
transport_table.attach (action_script_table, TCOL, 0, 2, SHRINK, EXPAND|FILL, 1, 0);
|
||||
++col;
|
||||
for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) {
|
||||
const int r = i % 2;
|
||||
const int c = col + i / 2;
|
||||
transport_table.attach (action_script_call_btn[i], c, c + 1, r, r + 1, FILL, SHRINK, 1, vpadding);
|
||||
}
|
||||
col += MAX_LUA_ACTION_BUTTONS / 2;
|
||||
|
||||
transport_table.attach (editor_visibility_button, TCOL, 0, 1 , FILL, SHRINK, hpadding, vpadding);
|
||||
transport_table.attach (mixer_visibility_button, TCOL, 1, 2 , FILL, SHRINK, hpadding, vpadding);
|
||||
|
@ -303,7 +303,7 @@ ARDOUR_UI::setup_windows ()
|
||||
std::string const a = string_compose (X_("script-action-%1"), i + 1);
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action(X_("LuaAction"), a.c_str());
|
||||
assert (act);
|
||||
action_script_call_btn[i].set_text (string_compose ("%1", i+1));
|
||||
action_script_call_btn[i].set_text (string_compose ("%1%2", std::hex, i+1));
|
||||
action_script_call_btn[i].set_related_action (act);
|
||||
action_script_call_btn[i].signal_button_press_event().connect (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::bind_lua_action_script), i), false);
|
||||
if (act->get_sensitive ()) {
|
||||
@ -311,12 +311,9 @@ ARDOUR_UI::setup_windows ()
|
||||
} else {
|
||||
action_script_call_btn[i].set_visual_state (Gtkmm2ext::VisualState (action_script_call_btn[i].visual_state() | Gtkmm2ext::Insensitive));
|
||||
}
|
||||
const int row = i % 2;
|
||||
const int col = i / 2;
|
||||
action_script_table.attach (action_script_call_btn[i], col, col + 1, row, row + 1, EXPAND, EXPAND, 1, 0);
|
||||
action_script_call_btn[i].set_sizing_text ("|||");
|
||||
action_script_call_btn[i].set_no_show_all ();
|
||||
}
|
||||
action_script_table.show ();
|
||||
|
||||
setup_transport();
|
||||
build_menu_bar ();
|
||||
|
Loading…
Reference in New Issue
Block a user