From 037de53c3f1c62a836a80750894b3d39705283ad Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Wed, 21 Dec 2022 19:22:29 -0600 Subject: [PATCH] bbt_marker_dialog: improve layout + spacings --- gtk2_ardour/bbt_marker_dialog.cc | 20 +++++++++++++------- gtk2_ardour/bbt_marker_dialog.h | 3 ++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/gtk2_ardour/bbt_marker_dialog.cc b/gtk2_ardour/bbt_marker_dialog.cc index 79a036b2fe..a588099b4b 100644 --- a/gtk2_ardour/bbt_marker_dialog.cc +++ b/gtk2_ardour/bbt_marker_dialog.cc @@ -34,7 +34,8 @@ BBTMarkerDialog::BBTMarkerDialog (timepos_t const & pos, BBT_Time const& bbt) , _point (0) , _position (pos) , _bbt (bbt) - , entry_label (_("BBT")) + , bar_label (_("Bar")) + , beat_label (_("Beat")) , name_label (_("Name")) { @@ -46,7 +47,8 @@ BBTMarkerDialog::BBTMarkerDialog (MusicTimePoint& p) , _point (&p) , _position (timepos_t::from_superclock (p.sclock())) , _bbt (TempoMap::use()->bbt_at (_position).round_to_beat ()) - , entry_label (_("BBT")) + , bar_label (_("Bar")) + , beat_label (_("Beat")) , name_label (_("Name")) { init (false); @@ -60,15 +62,19 @@ BBTMarkerDialog::init (bool add) bar_entry.set_digits (0); beat_entry.set_digits (0); - bbt_box.pack_start (entry_label); - bbt_box.pack_start (bar_entry); - bbt_box.pack_start (beat_entry); + bar_label.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER); + beat_label.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER); + + bbt_box.pack_start (bar_label, true, true, 2); + bbt_box.pack_start (bar_entry, true, true, 2); + bbt_box.pack_start (beat_label, true, true, 2); + bbt_box.pack_start (beat_entry, true, true, 2); bar_entry.set_value (_bbt.bars); beat_entry.set_value (_bbt.beats); - name_box.pack_start (name_label); - name_box.pack_start (name_entry); + name_box.pack_start (name_label, true, true, 4); + name_box.pack_start (name_entry, true, true); if (_point) { name_entry.set_text (_point->name()); diff --git a/gtk2_ardour/bbt_marker_dialog.h b/gtk2_ardour/bbt_marker_dialog.h index 63c1e06756..376a725031 100644 --- a/gtk2_ardour/bbt_marker_dialog.h +++ b/gtk2_ardour/bbt_marker_dialog.h @@ -49,7 +49,8 @@ private: Gtk::HBox bbt_box; Gtk::SpinButton bar_entry; Gtk::SpinButton beat_entry; - Gtk::Label entry_label; + Gtk::Label bar_label; + Gtk::Label beat_label; Gtk::HBox name_box; Gtk::Entry name_entry;