diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index ef2d6b07b3..c75a40eeb4 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -216,15 +216,15 @@ ARDOUR_UI::tearoff_settings (const char* name) const return 0; } -#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * ARDOUR_UI::ui_scale)) +#define PX_SCALE(px) std::max((float)px, rintf((float)px * ARDOUR_UI::ui_scale)) void ARDOUR_UI::setup_transport () { RefPtr act; - transport_tearoff_hbox.set_border_width (PX_SCALE(3,3)); - transport_tearoff_hbox.set_spacing (PX_SCALE(3,3)); + transport_tearoff_hbox.set_border_width (PX_SCALE(3)); + transport_tearoff_hbox.set_spacing (PX_SCALE(3)); transport_tearoff = manage (new TearOff (transport_tearoff_hbox)); transport_tearoff->set_name ("TransportBase"); @@ -347,7 +347,7 @@ ARDOUR_UI::setup_transport () error_alert_button.set_fallthrough_to_parent(true); alert_box.set_homogeneous (true); - alert_box.set_spacing (PX_SCALE(2, 2)); + alert_box.set_spacing (PX_SCALE(2)); alert_box.pack_start (solo_alert_button, true, true); alert_box.pack_start (auditioning_alert_button, true, true); alert_box.pack_start (feedback_alert_button, true, true); @@ -366,9 +366,9 @@ ARDOUR_UI::setup_transport () transport_button_size_group->add_widget (stop_button); /* the icon for this has an odd aspect ratio, so fatten up the button */ - midi_panic_button.set_size_request (PX_SCALE(25, 25), -1); - goto_start_button.set_size_request (PX_SCALE(28, 28), PX_SCALE(44, 44)); - click_button.set_size_request (PX_SCALE(32, 32), PX_SCALE(44, 44)); + midi_panic_button.set_size_request (PX_SCALE(25), -1); + goto_start_button.set_size_request (PX_SCALE(28), PX_SCALE(44)); + click_button.set_size_request (PX_SCALE(32), PX_SCALE(44)); HBox* tbox1 = manage (new HBox); @@ -381,9 +381,9 @@ ARDOUR_UI::setup_transport () Alignment* a1 = manage (new Alignment); Alignment* a2 = manage (new Alignment); - tbox1->set_spacing (PX_SCALE(2, 2)); - tbox2->set_spacing (PX_SCALE(2, 2)); - tbox->set_spacing (PX_SCALE(2, 2)); + tbox1->set_spacing (PX_SCALE(2)); + tbox2->set_spacing (PX_SCALE(2)); + tbox->set_spacing (PX_SCALE(2)); if (!Profile->get_trx()) { tbox1->pack_start (midi_panic_button, true, true, 5); @@ -418,7 +418,7 @@ ARDOUR_UI::setup_transport () if (!ARDOUR::Profile->get_small_screen() && !ARDOUR::Profile->get_trx()) { clock_box->pack_start (*secondary_clock, false, false); } - clock_box->set_spacing (PX_SCALE(3, 3)); + clock_box->set_spacing (PX_SCALE(3)); shuttle_box = manage (new ShuttleControl); shuttle_box->show (); @@ -426,7 +426,7 @@ ARDOUR_UI::setup_transport () VBox* transport_vbox = manage (new VBox); transport_vbox->set_name ("TransportBase"); transport_vbox->set_border_width (0); - transport_vbox->set_spacing (PX_SCALE(3, 3)); + transport_vbox->set_spacing (PX_SCALE(3)); transport_vbox->pack_start (*tbox, true, true, 0); if (!Profile->get_trx()) { @@ -445,7 +445,7 @@ ARDOUR_UI::setup_transport () VBox* auto_box = manage (new VBox); auto_box->set_homogeneous (true); - auto_box->set_spacing (PX_SCALE(2, 2)); + auto_box->set_spacing (PX_SCALE(2)); auto_box->pack_start (sync_button, true, true); if (!ARDOUR::Profile->get_trx()) { auto_box->pack_start (follow_edits_button, true, true);