Add option to hide the 2ndary clock
This commit is contained in:
parent
ef8187662a
commit
91321272b5
@ -272,6 +272,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
, _mixer_on_top (false)
|
||||
, _initial_verbose_plugin_scan (false)
|
||||
, first_time_engine_run (true)
|
||||
, secondary_clock_spacer (0)
|
||||
, roll_controllable (new TransportControllable ("transport roll", *this, TransportControllable::Roll))
|
||||
, stop_controllable (new TransportControllable ("transport stop", *this, TransportControllable::Stop))
|
||||
, goto_start_controllable (new TransportControllable ("transport goto start", *this, TransportControllable::GotoStart))
|
||||
|
@ -101,6 +101,7 @@
|
||||
class About;
|
||||
class AddRouteDialog;
|
||||
class AddVideoDialog;
|
||||
class ArdourVSpacer;
|
||||
class BigClockWindow;
|
||||
class BundleManager;
|
||||
class EngineControl;
|
||||
@ -478,7 +479,9 @@ private:
|
||||
Gtk::Frame transport_frame;
|
||||
Gtk::HBox transport_hbox;
|
||||
|
||||
ArdourVSpacer *secondary_clock_spacer;
|
||||
void repack_transport_hbox ();
|
||||
void update_clock_visibility ();
|
||||
|
||||
struct TransportControllable : public PBD::Controllable {
|
||||
enum ToggleType {
|
||||
|
@ -214,6 +214,25 @@ ARDOUR_UI::repack_transport_hbox ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::update_clock_visibility ()
|
||||
{
|
||||
if (ARDOUR::Profile->get_small_screen()) {
|
||||
return;
|
||||
}
|
||||
if (UIConfiguration::instance().get_show_secondary_clock ()) {
|
||||
secondary_clock->show();
|
||||
secondary_clock->left_btn()->show();
|
||||
secondary_clock->right_btn()->show();
|
||||
secondary_clock_spacer->show();
|
||||
} else {
|
||||
secondary_clock->hide();
|
||||
secondary_clock->left_btn()->hide();
|
||||
secondary_clock->right_btn()->hide();
|
||||
secondary_clock_spacer->hide();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::transport_expose (GdkEventExpose* ev)
|
||||
{
|
||||
@ -543,11 +562,15 @@ ARDOUR_UI::setup_transport ()
|
||||
transport_table.attach (*secondary_clock, col, col + 2, 0, 1 , FILL, SHRINK, 2, 0);
|
||||
transport_table.attach (*secondary_clock->left_btn(), col, col + 1, 1, 2 , FILL, SHRINK, 2, 0);
|
||||
transport_table.attach (*secondary_clock->right_btn(), col + 1, col + 2, 1, 2 , FILL, SHRINK, 2, 0);
|
||||
secondary_clock->set_no_show_all (true);
|
||||
secondary_clock->left_btn()->set_no_show_all (true);
|
||||
secondary_clock->right_btn()->set_no_show_all (true);
|
||||
col += 2;
|
||||
}
|
||||
|
||||
transport_table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
||||
++col;
|
||||
secondary_clock_spacer = manage (new ArdourVSpacer ());
|
||||
transport_table.attach (*secondary_clock_spacer, TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
||||
++col;
|
||||
}
|
||||
|
||||
transport_table.attach (*alert_box, TCOL, 0, 2, SHRINK, EXPAND|FILL, 2, 0);
|
||||
++col;
|
||||
@ -569,6 +592,7 @@ ARDOUR_UI::setup_transport ()
|
||||
++col;
|
||||
|
||||
repack_transport_hbox ();
|
||||
update_clock_visibility ();
|
||||
/* desensitize */
|
||||
|
||||
feedback_alert_button.set_sensitive (false);
|
||||
|
@ -409,6 +409,8 @@ ARDOUR_UI::parameter_changed (std::string p)
|
||||
repack_transport_hbox ();
|
||||
} else if (p == "show-editor-meter") {
|
||||
repack_transport_hbox ();
|
||||
} else if (p == "show-secondary-clock") {
|
||||
update_clock_visibility ();
|
||||
} else if (p == "waveform-scale") {
|
||||
ArdourCanvas::WaveView::set_global_logscaled (UIConfiguration::instance().get_waveform_scale() == Logarithmic);
|
||||
} else if (p == "widget-prelight") {
|
||||
|
@ -3489,6 +3489,16 @@ if (!ARDOUR::Profile->get_mixbus()) {
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_toolbar_selclock)
|
||||
));
|
||||
|
||||
if (!ARDOUR::Profile->get_small_screen()) {
|
||||
add_option (_("GUI/Toolbar"),
|
||||
new BoolOption (
|
||||
"show-secondary-clock",
|
||||
_("Display Secondary Clock in the Toolbar"),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_secondary_clock),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_secondary_clock)
|
||||
));
|
||||
}
|
||||
|
||||
add_option (_("GUI/Toolbar"),
|
||||
new BoolOption (
|
||||
"show-mini-timeline",
|
||||
|
@ -74,6 +74,7 @@ UI_CONFIG_VARIABLE (bool, meter_style_led, "meter-style-led", false)
|
||||
UI_CONFIG_VARIABLE (bool, show_editor_meter, "show-editor-meter", true)
|
||||
UI_CONFIG_VARIABLE (bool, show_toolbar_selclock, "show-toolbar-selclock", false)
|
||||
UI_CONFIG_VARIABLE (bool, show_mini_timeline, "show-mini-timeline", true)
|
||||
UI_CONFIG_VARIABLE (bool, show_secondary_clock, "show-secondary-clock", true)
|
||||
UI_CONFIG_VARIABLE (double, waveform_clip_level, "waveform-clip-level", -0.0933967) /* units of dB */
|
||||
UI_CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true)
|
||||
UI_CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false)
|
||||
|
Loading…
Reference in New Issue
Block a user