Changeset 9499


Ignore:
Timestamp:
12/05/09 22:35:36 (2 years ago)
Author:
garu
Message:

fixing alignment issues with dialog topbar and components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-Catalyst/lib/Padre/Plugin/Catalyst/Panel.pm

    r9489 r9499  
    2121 
    2222    # main container 
    23     my $box        = Wx::BoxSizer->new(Wx::wxVERTICAL); 
     23    my $box = Wx::BoxSizer->new(Wx::wxVERTICAL); 
    2424     
    2525    # top box, holding buttons, icons and checkboxes 
    26      
    27     #TODO FIXME: the top bar is too big, it would be nice to 
    28     # make it fit just the size of the button, and vertically align 
    29     # the other controls do centralize them (vertically). 
    30     # Maybe we need a Wx::GridSizer 
    31     my $top_box    = Wx::BoxSizer->new(Wx::wxHORIZONTAL); 
     26    my $top_box = Wx::BoxSizer->new(Wx::wxHORIZONTAL); 
    3227 
    3328    # visual led showing server state    
    3429    my $led = Wx::StaticBitmap->new( $self, -1, Wx::wxNullBitmap ); 
    3530    $led->SetBitmap( $self->led('red') ); 
    36     $top_box->Add( $led ); 
     31    $top_box->Add( $led, 0, Wx::wxALIGN_CENTER_VERTICAL ); 
    3732    $self->{led} = $led; 
    3833     
     
    5146        }, 
    5247    ); 
    53     $top_box->Add($button); 
     48    $top_box->Add($button, 0, Wx::wxALIGN_CENTER_VERTICAL); 
    5449     
    5550    # checkbox to auto-restart 
    5651    my $checkbox = Wx::CheckBox->new($self, -1, _T('auto-restart')); 
    5752    Wx::Event::EVT_CHECKBOX( $self, $checkbox, sub { shift->{config}->{auto_restart} ^= 1 } ); 
    58     $top_box->Add( $checkbox ); 
     53    $top_box->Add( $checkbox, 0, Wx::wxALIGN_CENTER_VERTICAL ); 
    5954     
    6055    # finishing up the top_box 
    61     $box->Add( $top_box, 1, Wx::wxGROW ); 
     56    #$box->Add( $top_box, 1, Wx::wxGROW ); 
     57    $box->Add( $top_box, 0, Wx::wxALIGN_LEFT | Wx::wxALIGN_CENTER_VERTICAL ); 
    6258 
    6359    # output panel for server 
    6460    require Padre::Wx::Output; 
    6561    my $output = Padre::Wx::Output->new($self); 
    66     $box->Add( $output, 2, Wx::wxGROW ); 
     62    $box->Add( $output, 1, Wx::wxGROW ); 
    6763 
    6864    # wrapping it up and showing on the screen 
Note: See TracChangeset for help on using the changeset viewer.