Changeset 3461


Ignore:
Timestamp:
Jun 26, 2009, 10:14:10 AM (12 years ago)
Author:
ronosman
Message:

Bug 1027 fixed. New implementation using html window showing scrollbars when needed.

Location:
extensions/pLoader/trunk/src/Uploader/GUI
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm

    r3458 r3461  
    361361     
    362362use Uploader::GUI::wxImageListCtrl;
    363 use Uploader::GUI::wxImagePreview;
    364363use Uploader::GUI::wxImageProcessingProgressDlg;
    365364use Wx::Html;
     
    387386                                   );
    388387
    389    
    390388    $self->perspective(
    391389        $params->{perspective}
     
    865863
    866864    $self->image_preview(
    867         Uploader::GUI::wxImagePreview->new(
     865        Wx::HtmlWindow->new(
    868866            $self,
    869867            -1,
    870             [400,300],
     868            [-1,-1],
     869            [-1,-1],
    871870        )
    872871    );
     
    947946    $self->manager->AddPane
    948947      ( $self->create_notebook_imagelist, Wx::AuiPaneInfo->new->Name( "ImageViewer" )
    949         ->CenterPane->Position(1)->Resizable->CloseButton(0) );
     948        ->CenterPane->Resizable->CloseButton(0) );
    950949
    951950    $self->manager->AddPane(
     
    10021001    $self->manager->AddPane
    10031002      ( $self->image_preview, Wx::AuiPaneInfo->new->Name( "image_preview" )
    1004         ->Floatable(1)->Fixed->CloseButton(1));
     1003        ->Floatable(1)->Resizable->CloseButton(1));
    10051004
    10061005    $self->manager->AddPane
     
    14841483    $self->imageviewer->Refresh;       
    14851484
    1486     $self->image_preview->SetBitmap(
    1487         wxNullBitmap
     1485    $self->image_preview->SetPage(
     1486        "<html></html>"
    14881487    ) if !$self->imageviewer->GetItemCount;
    14891488
     
    16841683    my ( $self ) = @_; 
    16851684
    1686     $self->image_preview->SetBitmap(
    1687         wxNullBitmap
    1688     );
    1689 
    1690     $self->image_preview->Refresh;
     1685
     1686    my $html_src = sprintf("
     1687      <html>
     1688         <body>
     1689             <img src=\"%s\"/>
     1690         </body>
     1691      </html>
     1692      ",
     1693      $self->imagelist->current_image->preview_file,
     1694    );
     1695       
     1696    $self->image_preview->SetPage(
     1697        $html_src
     1698    );
    16911699
    16921700    my $bmp = Wx::Bitmap->new(
     
    16951703        );
    16961704
    1697        
    1698     $self->image_preview->SetBitmap(
    1699         $bmp
    1700     );
    1701 
    1702     my $size = [8+$bmp->GetWidth, 26+$bmp->GetHeight];
     1705    my $size = [40+$bmp->GetWidth, 60+$bmp->GetHeight];
     1706
    17031707    $self->manager->GetPane("image_preview")->FloatingSize($size);
    17041708   
    1705     $self->image_preview->Refresh;
    17061709}
    17071710
Note: See TracChangeset for help on using the changeset viewer.