Remove "add route" button from recorder and mixer
This GTK button style is out of place in both contexts. Furthermore it is inconsistent to not have the same button in the editor (there is a dropzone).
This commit is contained in:
@@ -89,6 +89,8 @@
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
#define PX_SCALE(px) std::max ((float)px, rintf ((float)px* UIConfiguration::instance ().get_ui_scale ()))
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace ARDOUR_UI_UTILS;
|
||||
using namespace ARDOUR_PLUGIN_UTILS;
|
||||
@@ -157,23 +159,9 @@ Mixer_UI::Mixer_UI ()
|
||||
scroller_base.drag_dest_set (target_table);
|
||||
scroller_base.signal_drag_data_received().connect (sigc::mem_fun(*this, &Mixer_UI::scroller_drag_data_received));
|
||||
|
||||
/* create a button to add VCA strips ... will get packed in redisplay_track_list() */
|
||||
Widget* w = manage (new Image (Stock::ADD, ICON_SIZE_BUTTON));
|
||||
w->show ();
|
||||
add_vca_button.add (*w);
|
||||
add_vca_button.set_can_focus(false);
|
||||
add_vca_button.signal_clicked().connect (sigc::mem_fun (*this, &Mixer_UI::new_track_or_bus));
|
||||
|
||||
/* create a button to add mixer strips */
|
||||
w = manage (new Image (Stock::ADD, ICON_SIZE_BUTTON));
|
||||
w->show ();
|
||||
add_button.add (*w);
|
||||
add_button.set_can_focus(false);
|
||||
add_button.signal_clicked().connect (sigc::mem_fun (*this, &Mixer_UI::new_track_or_bus));
|
||||
|
||||
/* add as last item of strip packer */
|
||||
strip_packer.pack_end (scroller_base, true, true);
|
||||
strip_packer.pack_end (add_button, false, false);
|
||||
scroller_base.set_size_request (PX_SCALE (20), -1);
|
||||
|
||||
#ifdef MIXBUS
|
||||
/* create a drop-shadow at the end of the mixer strips */
|
||||
@@ -383,7 +371,6 @@ Mixer_UI::Mixer_UI ()
|
||||
list_hpane.show();
|
||||
group_display.show();
|
||||
favorite_plugins_display.show();
|
||||
add_button.show ();
|
||||
|
||||
XMLNode* mnode = ARDOUR_UI::instance()->tearoff_settings (X_("monitor-section"));
|
||||
if (mnode) {
|
||||
@@ -1687,9 +1674,8 @@ Mixer_UI::redisplay_track_list ()
|
||||
container_clear (vca_hpacker);
|
||||
|
||||
vca_hpacker.pack_end (vca_scroller_base, true, true);
|
||||
vca_hpacker.pack_end (add_vca_button, false, false);
|
||||
vca_scroller_base.set_size_request (PX_SCALE (20), -1);
|
||||
|
||||
add_vca_button.show ();
|
||||
vca_scroller_base.show();
|
||||
|
||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||
@@ -2628,7 +2614,7 @@ Mixer_UI::scroll_left ()
|
||||
using namespace Gtk::Box_Helpers;
|
||||
const BoxList& strips = strip_packer.children();
|
||||
for (BoxList::const_iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
if (i->get_widget() == & add_button) {
|
||||
if (i->get_widget() == &scroller_base) {
|
||||
continue;
|
||||
}
|
||||
#ifdef MIXBUS
|
||||
@@ -2660,7 +2646,7 @@ Mixer_UI::scroll_right ()
|
||||
using namespace Gtk::Box_Helpers;
|
||||
const BoxList& strips = strip_packer.children();
|
||||
for (BoxList::const_iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
if (i->get_widget() == & add_button) {
|
||||
if (i->get_widget() == &scroller_base) {
|
||||
continue;
|
||||
}
|
||||
#ifdef MIXBUS
|
||||
@@ -2720,7 +2706,7 @@ Mixer_UI::vca_scroll_left ()
|
||||
using namespace Gtk::Box_Helpers;
|
||||
const BoxList& strips = vca_hpacker.children();
|
||||
for (BoxList::const_iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
if (i->get_widget() == &add_vca_button) {
|
||||
if (i->get_widget() == &vca_scroller_base) {
|
||||
continue;
|
||||
}
|
||||
lm += i->get_widget()->get_width ();
|
||||
@@ -2747,7 +2733,7 @@ Mixer_UI::vca_scroll_right ()
|
||||
using namespace Gtk::Box_Helpers;
|
||||
const BoxList& strips = vca_hpacker.children();
|
||||
for (BoxList::const_iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
if (i->get_widget() == &add_vca_button) {
|
||||
if (i->get_widget() == &vca_scroller_base) {
|
||||
continue;
|
||||
}
|
||||
lm += i->get_widget()->get_width ();
|
||||
@@ -3855,7 +3841,6 @@ Mixer_UI::screenshot (std::string const& filename)
|
||||
strip_group_box.remove (strip_packer);
|
||||
b.pack_start (strip_packer, false, false);
|
||||
/* hide extra elements inside strip_packer */
|
||||
add_button.hide ();
|
||||
scroller_base.hide ();
|
||||
#ifdef MIXBUS
|
||||
mb_shadow.hide();
|
||||
@@ -3867,7 +3852,6 @@ Mixer_UI::screenshot (std::string const& filename)
|
||||
viewport->remove (); // << vca_hpacker
|
||||
b.pack_start (vca_hpacker, false, false);
|
||||
/* hide some growing widgets */
|
||||
add_vca_button.hide ();
|
||||
vca_scroller_base.hide();
|
||||
}
|
||||
|
||||
@@ -3896,14 +3880,12 @@ Mixer_UI::screenshot (std::string const& filename)
|
||||
osw.remove ();
|
||||
|
||||
/* now re-pack the widgets into the main mixer window */
|
||||
add_button.show ();
|
||||
scroller_base.show ();
|
||||
#ifdef MIXBUS
|
||||
mb_shadow.show();
|
||||
#endif
|
||||
strip_group_box.pack_start (strip_packer);
|
||||
if (with_vca) {
|
||||
add_vca_button.show ();
|
||||
vca_scroller_base.show();
|
||||
vca_scroller.add (vca_hpacker);
|
||||
}
|
||||
|
||||
@@ -202,8 +202,6 @@ private:
|
||||
Gtk::EventBox vca_scroller_base;
|
||||
Gtk::HBox out_packer;
|
||||
ArdourWidgets::HPane list_hpane;
|
||||
Gtk::Button add_button; // should really be an ArdourButton
|
||||
Gtk::Button add_vca_button;
|
||||
|
||||
MixerGroupTabs* _group_tabs;
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ using namespace ArdourWidgets;
|
||||
using namespace Gtk;
|
||||
using namespace std;
|
||||
|
||||
#define PX_SCALE(px) std::max ((float)px, rintf ((float)px* UIConfiguration::instance ().get_ui_scale ()))
|
||||
|
||||
RecorderUI::RecorderUI ()
|
||||
: Tabbable (_content, _("Recorder"), X_("recorder"))
|
||||
, _toolbar_sep (1.0)
|
||||
@@ -143,17 +145,12 @@ RecorderUI::RecorderUI ()
|
||||
_scroller_base.set_flags (CAN_FOCUS);
|
||||
_scroller_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
_scroller_base.signal_button_release_event().connect (sigc::mem_fun(*this, &RecorderUI::scroller_button_release));
|
||||
|
||||
/* create a button to add mixer strips */
|
||||
_add_route_button.add (*manage (new Image (Stock::ADD, ICON_SIZE_BUTTON)));
|
||||
_add_route_button.set_can_focus(false);
|
||||
_add_route_button.signal_clicked().connect (sigc::mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::add_route));
|
||||
_scroller_base.set_size_request (-1, PX_SCALE (20));
|
||||
|
||||
/* LAYOUT */
|
||||
|
||||
_rec_area.set_spacing (0);
|
||||
_rec_area.pack_end (_scroller_base, true, true);
|
||||
_rec_area.pack_end (_add_route_button, false, true);
|
||||
_rec_area.pack_end (_ruler_sep, false, false, 0);
|
||||
|
||||
/* HBox [ groups | tracks] */
|
||||
@@ -240,7 +237,6 @@ RecorderUI::RecorderUI ()
|
||||
_space.show ();
|
||||
_ruler_box.show ();
|
||||
_ruler_sep.show ();
|
||||
_add_route_button.show_all ();
|
||||
_scroller_base.show ();
|
||||
_toolbar_sep.show ();
|
||||
_rec_area.show ();
|
||||
@@ -1158,7 +1154,6 @@ RecorderUI::peak_reset ()
|
||||
|
||||
/* ****************************************************************************/
|
||||
|
||||
#define PX_SCALE(px) std::max ((float)px, rintf ((float)px* UIConfiguration::instance ().get_ui_scale ()))
|
||||
|
||||
bool RecorderUI::InputPort::_size_groups_initialized = false;
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@ private:
|
||||
Gtk::ScrolledWindow _meter_scroller;
|
||||
Gtk::VBox _meter_area;
|
||||
Gtk::Table _meter_table;
|
||||
Gtk::Button _add_route_button;
|
||||
Gtk::EventBox _scroller_base;
|
||||
|
||||
ArdourWidgets::ArdourHSpacer _toolbar_sep;
|
||||
|
||||
Reference in New Issue
Block a user