Changeset 2460


Ignore:
Timestamp:
Jul 23, 2007, 12:56:51 AM (15 years ago)
Author:
charles
Message:

cleaner sizer code in the main window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wx/xmission.cc

    r2459 r2460  
    560560
    561561    wxSplitterWindow * hsplit = new wxSplitterWindow( this );
     562    hsplit->SetSashGravity( 0.8 );
    562563
    563564    wxPanel * row1 = new wxPanel( hsplit, wxID_ANY );
    564     wxFlexGridSizer * row_sizer = new wxFlexGridSizer( 2, 0, 5 );
    565     row_sizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
    566     row_sizer->SetFlexibleDirection( wxHORIZONTAL );
    567     row1->SetSizer( row_sizer );
    568 
    569     /**
    570     ***  Filters
    571     **/
     565
     566    /* Filters */
    572567
    573568    wxListCtrl * filters = new wxListCtrl( row1, wxID_ANY, wxDefaultPosition, wxDefaultSize,
     
    580575    filters->InsertItem( i++, _T("Active (1)") );
    581576    filters->InsertItem( i++, _T("Inactive") );
    582     row_sizer->Add( filters, wxSizerFlags().Expand() );
    583 
    584     /**
    585     ***  Torrent List
    586     **/
     577
     578    /* Torrent List */
    587579
    588580    myTorrentList = new wxListCtrl( row1, wxID_ANY, wxDefaultPosition, wxDefaultSize,
    589581                                    wxLC_REPORT|wxLC_SINGLE_SEL );
    590582    rebuildTorrentList();
    591     row_sizer->Add( myTorrentList, wxSizerFlags().Expand() );
    592     row_sizer->AddGrowableCol( 1, 1 );
     583
     584    wxBoxSizer * boxSizer = new wxBoxSizer( wxHORIZONTAL );
     585    boxSizer->Add( filters, 0, wxEXPAND|wxRIGHT, 5 );
     586    boxSizer->Add( myTorrentList, 1, wxEXPAND, 0 );
     587    row1->SetSizer( boxSizer );
    593588
    594589
    595590    wxNotebook * notebook = new wxNotebook( hsplit, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
    596 
    597591    wxButton * tmp = new wxButton( notebook, wxID_ANY, _T("Hello World"));
    598592    notebook->AddPage( tmp, _T("General"), false );
Note: See TracChangeset for help on using the changeset viewer.