summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-07-10 14:08:24 +0200
committerRobin Gareus <robin@gareus.org>2016-07-10 14:08:24 +0200
commit8ff46aa9c695c89182213a5c05a1c9415322e348 (patch)
tree00d6ec72848929b292c41913ba6bf8b687b69dcf /gtk2_ardour/sfdb_ui.cc
parent509ce07c28542c4cc8ce2e4f8acf08f0235afe42 (diff)
re-layout import dialog (better fit for narrow screens)
The instrument dropdown can be very wide (depending on available synths) and combined with other dropdowns and the copy-checkbox in a single row, the min. width was well above 1400px.
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc83
1 files changed, 25 insertions, 58 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 8f496f585b..9e5e65625b 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -1674,18 +1674,14 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
, _import_active (false)
, _reset_post_import (false)
{
- VBox* vbox;
- HBox* hbox;
vector<string> str;
- set_size_request (-1, 450);
+ set_size_request (-1, 550);
block_two.set_border_width (12);
block_three.set_border_width (12);
block_four.set_border_width (12);
- options.set_spacing (12);
-
str.clear ();
str.push_back (_("file timestamp"));
str.push_back (_("edit point"));
@@ -1697,40 +1693,36 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
Label* l = manage (new Label);
l->set_markup (_("<b>Add files ...</b>"));
-
- vbox = manage (new VBox);
- vbox->set_border_width (12);
- vbox->set_spacing (6);
- vbox->pack_start (*l, false, false);
- vbox->pack_start (action_combo, false, false);
- hbox = manage (new HBox);
- hbox->pack_start (*vbox, false, false);
- options.pack_start (*hbox, false, false);
+ options.attach (*l, 0, 1, 0, 1, FILL, SHRINK, 8, 0);
+ options.attach (action_combo, 0, 1, 1, 2, FILL, SHRINK, 8, 0);
l = manage (new Label);
l->set_markup (_("<b>Insert at</b>"));
+ options.attach (*l, 0, 1, 3, 4, FILL, SHRINK, 8, 0);
+ options.attach (where_combo, 0, 1, 4, 5, FILL, SHRINK, 8, 0);
- vbox = manage (new VBox);
- vbox->set_border_width (12);
- vbox->set_spacing (6);
- vbox->pack_start (*l, false, false);
- vbox->pack_start (where_combo, false, false);
- hbox = manage (new HBox);
- hbox->pack_start (*vbox, false, false);
- options.pack_start (*hbox, false, false);
+ l = manage (new Label);
+ l->set_markup (_("<b>Mapping</b>"));
+ options.attach (*l, 1, 2, 0, 1, FILL, SHRINK, 8, 0);
+ options.attach (channel_combo, 1, 2, 1, 2, FILL, SHRINK, 8, 0);
+ l = manage (new Label);
+ l->set_markup (_("<b>Conversion quality</b>"));
+ options.attach (*l, 1, 2, 3, 4, FILL, SHRINK, 8, 0);
+ options.attach (src_combo, 1, 2, 4, 5, FILL, SHRINK, 8, 0);
l = manage (new Label);
- l->set_markup (_("<b>Mapping</b>"));
+ l->set_markup (_("<b>Instrument</b>"));
+ options.attach (*l, 3, 4, 0, 1, FILL, SHRINK, 8, 0);
+ options.attach (instrument_combo, 3, 4, 1, 2, FILL, SHRINK, 8, 0);
- vbox = manage (new VBox);
- vbox->set_border_width (12);
- vbox->set_spacing (6);
- vbox->pack_start (*l, false, false);
- vbox->pack_start (channel_combo, false, false);
- hbox = manage (new HBox);
- hbox->pack_start (*vbox, false, false);
- options.pack_start (*hbox, false, false);
+ Alignment *hspace = manage (new Alignment ());
+ hspace->set_size_request(2, 2);
+ options.attach (*hspace, 0, 3, 2, 3, FILL, SHRINK, 0, 8);
+
+ Alignment *vspace = manage (new Alignment ());
+ vspace->set_size_request(2, 2);
+ options.attach (*vspace, 2, 3, 0, 3, EXPAND, SHRINK, 0, 0);
str.clear ();
str.push_back (_("one track per file"));
@@ -1738,30 +1730,6 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
channel_combo.set_active_text (str.front());
channel_combo.set_sensitive (false);
- l = manage (new Label);
- l->set_markup (_("<b>Conversion quality</b>"));
-
- vbox = manage (new VBox);
- vbox->set_border_width (12);
- vbox->set_spacing (6);
- vbox->pack_start (*l, false, false);
- vbox->pack_start (src_combo, false, false);
- hbox = manage (new HBox);
- hbox->pack_start (*vbox, false, false);
- options.pack_start (*hbox, false, false);
-
- l = manage (new Label);
- l->set_markup (_("<b>Instrument</b>"));
-
- vbox = manage (new VBox);
- vbox->set_border_width (12);
- vbox->set_spacing (6);
- vbox->pack_start (*l, false, false);
- vbox->pack_start (instrument_combo, false, false);
- hbox = manage (new HBox);
- hbox->pack_start (*vbox, false, false);
- options.pack_start (*hbox, false, false);
-
str.clear ();
str.push_back (_("Best"));
str.push_back (_("Good"));
@@ -1787,10 +1755,9 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
}
block_four.pack_start (copy_files_btn, false, false);
+ options.attach (block_four, 3, 4, 4, 5, FILL, SHRINK, 8, 0);
- options.pack_start (block_four, false, false);
-
- vpacker.pack_start (options, false, false);
+ vpacker.pack_start (options, false, true);
/* setup disposition map */