Changeset 5511


Ignore:
Timestamp:
06/23/09 11:26:13 (3 years ago)
Author:
azawawi
Message:

[Ecliptic] Quick fix dialog has less size/position hard-coding. Takes a smaller font than editor's line text height (i.e. works with CTRL +/-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-Ecliptic/lib/Padre/Plugin/Ecliptic/QuickFixDialog.pm

    r5501 r5511  
    4545        -1, 
    4646        Wx::gettext('Quick Fix'), 
    47         [$pt->x, $pt->y + 18],  # XXX- no hardcoding plz 
     47        [$pt->x, $pt->y + $editor->TextHeight(0)], 
    4848        Wx::wxDefaultSize, 
    4949        Wx::wxBORDER_SIMPLE, 
     
    143143    my $current = $self->_plugin->current; 
    144144    my $editor = $current->editor; 
    145     my $list_width = 260; 
    146     $self->SetFont($editor->GetFont); 
     145    my $list_width = 280; 
     146    my $editor_font = $self->GetFont; 
     147    my $editor_font_size = $editor->TextHeight(0) - 10; 
     148    if($editor_font_size < 10) { 
     149        $editor_font_size = 10; 
     150    } 
     151    $editor_font->SetPointSize($editor_font_size); 
     152    $self->SetFont($editor_font); 
    147153    $self->_list(  
    148154        Wx::ListView->new( 
     
    150156            -1, 
    151157            Wx::wxDefaultPosition, 
    152             [$list_width,190], 
     158            [$list_width,100], 
    153159            Wx::wxLC_REPORT | Wx::wxLC_NO_HEADER | Wx::wxLC_SINGLE_SEL |  
    154160            Wx::wxBORDER_NONE 
Note: See TracChangeset for help on using the changeset viewer.