Annotation of nono/wx/wxversion.cpp, revision 1.1.1.1

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
                      7: // バージョンダイアログ
                      8: 
                      9: #include "wxversion.h"
                     10: 
                     11: // コンストラクタ
                     12: WXVersionDlg::WXVersionDlg(wxWindow *parent)
                     13:        : inherited(parent, wxID_ANY, _("About nono"))
                     14: {
                     15:        wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
                     16: 
                     17:        wxString title = wxString::Format("nono %d.%d.%d (%s)",
                     18:                NONO_MAJOR_VER, NONO_MINOR_VER, NONO_PATCH_VER, NONO_DATE);
                     19: 
                     20:        // タイトルだけ少し大きく
                     21:        // XXX ..したいのだが wxOSX だと色々おかしいのでただのテキストにする。
                     22:        auto titlectrl = new wxStaticText(this, wxID_ANY, title);
                     23: #if !defined(__WXOSX__)
                     24:        titlectrl->SetLabelMarkup("<span size=\"x-large\">" + title + "</span>");
                     25: #endif
                     26:        vbox->Add(titlectrl, 0, wxALIGN_CENTER);
                     27: 
                     28:        // 空行
                     29:        vbox->Add(new wxStaticText(this, wxID_ANY, ""));
                     30: 
                     31:        // Copyright
                     32:        vbox->Add(new wxStaticText(this, wxID_ANY,
                     33:                "Copyright (C) 2020 nono project"));
                     34: 
                     35:        // 空行
                     36:        vbox->Add(new wxStaticText(this, wxID_ANY, ""));
                     37: 
                     38:        // OK
                     39:        vbox->Add(CreateButtonSizer(wxOK), 0, wxALIGN_CENTER);
                     40: 
                     41:        // 周囲に 12px の余白をつける
                     42:        wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
                     43:        topsizer->Add(vbox, 0, wxALL, 12);
                     44:        SetSizer(topsizer);
                     45:        topsizer->SetSizeHints(this);
                     46: }
                     47: 
                     48: // デストラクタ
                     49: WXVersionDlg::~WXVersionDlg()
                     50: {
                     51: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.