_frames = new wxTextCtrl (_editable, wxID_ANY, wxT(""), wxDefaultPosition, s, 0, validator);
_frames->SetMaxLength (2);
editable_sizer->Add (_frames);
+
if (set_button) {
- _set_button = new Button (_editable, _("Set"));
+ _set_button = new Button (_editable, _("Set"), wxDefaultPosition, small_button_size(parent, _("Set")));
editable_sizer->Add (_set_button, 0, wxLEFT | wxRIGHT, 8);
}
_editable->SetSizerAndFit (editable_sizer);
_scale_label = create_label (this, _("Scale"), true);
_scale_fit = new wxRadioButton (this, wxID_ANY, _("to fit DCP"));
_scale_custom = new wxRadioButton (this, wxID_ANY, _("custom"));
- _scale_custom_edit = new Button (this, _("Edit..."));
+ _scale_custom_edit = new Button (this, _("Edit..."), wxDefaultPosition, small_button_size(this, _("Edit...")));
_colour_conversion_label = create_label (this, _("Colour conversion"), true);
_colour_conversion = new wxChoice (this, wxID_ANY, wxDefaultPosition, size);
/// TRANSLATORS: translate the word "Custom" here; do not include the "Colour|" prefix
_colour_conversion->Append (S_("Colour|Custom"));
- _edit_colour_conversion_button = new Button (this, _("Edit..."));
+ _edit_colour_conversion_button = new Button (this, _("Edit..."), wxDefaultPosition, small_button_size(this, _("Edit...")));
_range_label = create_label (this, _("Range"), true);
_range = new wxChoice (this, wxID_ANY);
/*
- Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
return std_to_wx (p.string());
}
+
+wxSize
+small_button_size (wxWindow* parent, wxString text)
+{
+ wxClientDC dc (parent);
+ wxSize size = dc.GetTextExtent (text);
+ size.SetHeight (-1);
+ size.IncBy (24, 0);
+ return size;
+}
+
extern bool display_progress (wxString title, wxString task);
extern bool report_errors_from_last_job (wxWindow* parent);
extern wxString bitmap_path (std::string name);
+extern wxSize small_button_size (wxWindow* parent, wxString text);
struct Offset
{