Remove hardcoded file info box width
This addresses an issue with translations, where some labels result the box to need a width > 300px. This also scales the box with the rest of the UI.
This commit is contained in:
parent
49f5df69a1
commit
353e9b6843
@ -160,7 +160,6 @@ SoundFileBox::SoundFileBox (bool /*persistent*/)
|
||||
|
||||
{
|
||||
set_name (X_("SoundFileBox"));
|
||||
set_size_request (300, -1);
|
||||
|
||||
preview_label.set_markup (_("<b>Sound File Information</b>"));
|
||||
|
||||
@ -257,6 +256,13 @@ SoundFileBox::SoundFileBox (bool /*persistent*/)
|
||||
samplerate_value.set_alignment (0.0f, 0.5f);
|
||||
}
|
||||
|
||||
void
|
||||
SoundFileBox::on_size_request (Gtk::Requisition* req)
|
||||
{
|
||||
VBox::on_size_request (req);
|
||||
req->width = std::max<gint> (req->width, 300 * UIConfiguration::instance().get_ui_scale ());
|
||||
}
|
||||
|
||||
void
|
||||
SoundFileBox::set_session(Session* s)
|
||||
{
|
||||
|
@ -80,6 +80,8 @@ public:
|
||||
void set_import_position(Editing::ImportPosition p) { _import_position = p; }
|
||||
|
||||
protected:
|
||||
void on_size_request (Gtk::Requisition*);
|
||||
|
||||
std::string path;
|
||||
|
||||
ARDOUR::SoundFileInfo sf_info;
|
||||
|
Loading…
Reference in New Issue
Block a user