mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
scroll bar for tidiness
This commit is contained in:
parent
b16484896b
commit
e6b659d702
@ -516,7 +516,8 @@ END_EVENT_TABLE()
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
ViewCertDialog::
|
ViewCertDialog::
|
||||||
ViewCertDialog(AuthDialog *auth_dialog, X509 *cert) :
|
ViewCertDialog(AuthDialog *auth_dialog, X509 *cert) :
|
||||||
wxDialog(NULL, wxID_ANY, _T("View Certificate"), wxDefaultPosition),
|
wxDialog(NULL, wxID_ANY, _T("View Certificate"), wxDefaultPosition,
|
||||||
|
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
|
||||||
_auth_dialog(auth_dialog),
|
_auth_dialog(auth_dialog),
|
||||||
_cert(cert)
|
_cert(cert)
|
||||||
{
|
{
|
||||||
@ -581,9 +582,18 @@ layout() {
|
|||||||
wxPanel *panel = new wxPanel(this);
|
wxPanel *panel = new wxPanel(this);
|
||||||
wxBoxSizer *vsizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer *vsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
|
wxScrolledWindow *slwin = new wxScrolledWindow
|
||||||
|
(panel, -1, wxDefaultPosition, wxDefaultSize, wxVSCROLL | wxBORDER_SUNKEN);
|
||||||
|
slwin->SetScrollRate(0, 20);
|
||||||
|
|
||||||
|
wxBoxSizer *slsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
wxStaticText *text1 = new wxStaticText
|
wxStaticText *text1 = new wxStaticText
|
||||||
(panel, wxID_ANY, cert_body, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
|
(slwin, wxID_ANY, cert_body, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
|
||||||
vsizer->Add(text1, 0, wxCENTER | wxALL, 10);
|
slsizer->Add(text1, 0, wxEXPAND, 0);
|
||||||
|
slwin->SetSizer(slsizer);
|
||||||
|
|
||||||
|
vsizer->Add(slwin, 1, wxEXPAND | wxALL, 10);
|
||||||
|
|
||||||
// Create the run / cancel buttons.
|
// Create the run / cancel buttons.
|
||||||
wxBoxSizer *bsizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *bsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
@ -599,4 +609,10 @@ layout() {
|
|||||||
panel->SetSizer(vsizer);
|
panel->SetSizer(vsizer);
|
||||||
panel->SetAutoLayout(true);
|
panel->SetAutoLayout(true);
|
||||||
vsizer->Fit(this);
|
vsizer->Fit(this);
|
||||||
|
|
||||||
|
// Make sure the resulting window is not too wide, and at least a
|
||||||
|
// certain amount tall.
|
||||||
|
int width, height;
|
||||||
|
GetSize(&width, &height);
|
||||||
|
SetSize(min(width, 600), max(height, 400));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user