- add_label_to_sizer (_sizer, this, _("Filename"), true, wxGBPosition(r, 0));
- _recipient_file = new wxStaticText (this, wxID_ANY, wxT(""));
- checked_set (_recipient_file, recipient_file.get_value_or(""));
+ auto add_certificate_detail = [&r, this](wxString name, wxStaticText** value, wxSize size = wxDefaultSize) {
+ add_label_to_sizer(_sizer, this, name, true, wxGBPosition(r, 0), wxDefaultSpan, true);
+ *value = new StaticText(this, wxT (""), wxDefaultPosition, size);
+ _sizer->Add(*value, wxGBPosition(r, 1));
+ ++r;
+ };
+
+ wxClientDC dc (this);
+ wxFont teletype_font = _name->GetFont();
+ teletype_font.SetFamily(wxFONTFAMILY_TELETYPE);
+ dc.SetFont(teletype_font);
+ wxSize size = dc.GetTextExtent (wxT("1234567890123456789012345678"));
+ size.SetHeight (-1);
+
+ add_certificate_detail(_("Thumbprint"), &_recipient_thumbprint, size);
+ _recipient_thumbprint->SetFont(teletype_font);
+
+ add_label_to_sizer(_sizer, this, _("Filename"), true, wxGBPosition(r, 0), wxDefaultSpan, true);
+ _recipient_file = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(600, -1), wxST_ELLIPSIZE_MIDDLE | wxST_NO_AUTORESIZE);
+ set_recipient_file(recipient_file.get_value_or(""));