Ignore:
Timestamp:
Jan 24, 2010, 10:05:03 PM (14 years ago)
Author:
ronosman
Message:

Fix global_settings sizing issues.

Location:
extensions/pLoader/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/res/global_settings_wdr.pl

    r4727 r4738  
    1616use Wx qw( wxID_OK wxID_APPLY wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_NO wxID_EXIT wxID_ABOUT wxID_HELP );
    1717use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW );
    18 use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
     18use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL wxALIGN_LEFT wxALIGN_TOP);
    1919use Wx qw( wxST_NO_AUTORESIZE );
    2020
     
    173173   
    174174    my( $item12 ) = Wx::StaticText->new( $parent, $main::GS_SITE_IMG, "text", wxDefaultPosition, wxDefaultSize, 0 );
    175     $item10->AddWindow( $item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
     175    $item10->AddWindow( $item12, 0, wxALIGN_LEFT|wxALIGN_TOP|wxALL, 5 );
    176176
    177177    my( $item13 ) = Wx::BoxSizer->new( wxHORIZONTAL );
     
    314314    $item31->Add( $item34, 0, wxALIGN_CENTER_VERTICAL, 5 );
    315315
    316     $item0->Add( $item31, 0, wxALIGN_CENTER|wxALL, 5 );
     316    $item0->Add( $item31, 0, wxALIGN_LEFT|wxALL, 5 );
    317317
    318318    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
  • extensions/pLoader/trunk/src/Uploader/GUI/wxGlobalSettings.pm

    r4732 r4738  
    4242            wxBITMAP_TYPE_PNG
    4343            wxTheApp
     44            wxBK_LEFT
     45            wxHORIZONTAL
    4446        /;
    4547use base qw/Wx::Dialog Uploader::GUI::DlgCommon/;
     
    110112    }
    111113
     114    # Force layout an paint : awful but works
     115    $self->{cpane_hd}->Collapse(0);
     116    $self->{cpane_hd}->Collapse(1);
     117
    112118    $self;   
    113119}
     
    119125   
    120126    Wx::Event::EVT_BUTTON( $self, $self->{gs_close}, \&OnClose );
     127
    121128
    122129}
     
    217224sub GlobalSetting_ToolBook {
    218225    my( $parent ) = $_[0];
    219     my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
    220    
    221     my( $item2 ) = Wx::Toolbook->new( $parent, $main::ID_NOTEBOOK, wxDefaultPosition, [-1,-1], wxBK_DEFAULT  );
    222     my( $item1 ) = $item2;
    223     if( Wx->VERSION < 0.21 ) {
    224         $item1 = Wx::NotebookSizer->new( $item2 );
    225     }
     226    my( $topsizer ) = Wx::BoxSizer->new( wxVERTICAL );
     227   
     228    my( $tbook ) = Wx::Toolbook->new( $parent, $main::ID_NOTEBOOK, wxDefaultPosition, [-1,-1], wxBK_LEFT  );
    226229
    227230    my $imgl = Wx::ImageList->new( 16, 16 );
     
    233236    } qw/picture_edit.png pictures.png picture_key.png picture_go.png/;
    234237
    235     $item2->AssignImageList($imgl);
    236 
    237     my( $item3 ) = Wx::Panel->new( $item2, -1 );
     238    $tbook->AssignImageList($imgl);
     239
     240    my( $item3 ) = Wx::Panel->new( $tbook, -1 );
    238241    &main::GS_photo_properties( $item3, 0 );
    239     $item2->AddPage( $item3, gettext("Photo properties"), 0, 0 );
    240 
    241     my( $item4 ) = Wx::Panel->new( $item2, -1 );
     242    $tbook->AddPage( $item3, gettext("Photo properties"), 0, 0 );
     243
     244    my( $item4 ) = Wx::Panel->new( $tbook, -1 );
    242245    &main::GS_photo_preparation( $item4, 0 );
    243     $item2->AddPage( $item4, gettext("Photo size"), 0, 1 );
    244 
    245     my( $item5 ) = Wx::Panel->new( $item2, -1 );
     246    $tbook->AddPage( $item4, gettext("Photo size"), 0, 1 );
     247
     248    my( $item5 ) = Wx::Panel->new( $tbook, -1 );
    246249    &main::GS_photo_watermark( $item5, 0 );
    247     $item2->AddPage( $item5, gettext("Watermark"), 0, 2 );
    248 
    249     my( $item6 ) = Wx::Panel->new( $item2, -1 );
     250    $tbook->AddPage( $item5, gettext("Watermark"), 0, 2 );
     251
     252    my( $item6 ) = Wx::Panel->new( $tbook, -1 );
    250253    &main::GS_photo_transfer( $item6, 0 );
    251     $item2->AddPage( $item6, gettext("Transfer"), 0, 3 );
    252 
    253     $item0->Add( $item1, 0, wxALIGN_CENTER|wxALL, 5 );
     254    $tbook->AddPage( $item6, gettext("Transfer"), 0, 3 );
     255
     256
     257    $topsizer->Add( $tbook, 0, wxALIGN_CENTER|wxALL, 5 );
     258
    254259
    255260    my( $item87 ) = Wx::BoxSizer->new( wxVERTICAL );
     
    261266    $item87->AddWindow( $item89, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
    262267
    263     $item0->Add( $item87, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
    264 
    265 
    266     my( $set_size ) = @_ >= 3 ? $_[2] : 1;
    267     my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
    268     if( $set_size == 1 ) {
    269          $_[0]->SetSizer( $item0 );
    270          
    271          if( $call_fit == 1 ) {
    272              $item0->SetSizeHints( $_[0] );
    273          }
    274     }
    275    
    276     $item0;
     268    $topsizer->Add( $item87, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
     269
     270
     271    $_[0]->SetSizerAndFit( $topsizer );
     272
     273
     274
     275    $topsizer;
    277276}
    278277
Note: See TracChangeset for help on using the changeset viewer.