13
0

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:
Robin Gareus 2021-02-25 04:11:06 +01:00
parent 49f5df69a1
commit 353e9b6843
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 9 additions and 1 deletions

View File

@ -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)
{

View File

@ -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;