Changeset 32 for trunk/Lucide


Ignore:
Timestamp:
May 31, 2006, 6:07:08 PM (15 years ago)
Author:
Eugene Romanenko
Message:

preserve scroll pos on resize/zoom.

Location:
trunk/Lucide
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/BIN/t.cmd

    r2 r32  
    1 lucide c:\download\gnutella2.pdf
     1start /f lucide c:\download\gnutella2.pdf
  • trunk/Lucide/BIN/t1.cmd

    r2 r32  
    1 lucide "C:\Programs\AcrobatReader\Adobe\Acrobat 4.0\Help\ENU\Reader.pdf"
     1start /f lucide "C:\Programs\AcrobatReader\Adobe\Acrobat 4.0\Help\ENU\Reader.pdf"
  • trunk/Lucide/BIN/tj.cmd

    r18 r32  
    1 lucide D:\Projects\lucide\trunk\Lucide\djvu2spec.djvu
     1start /f lucide D:\Projects\lucide\trunk\Lucide\djvu2spec.djvu
  • trunk/Lucide/BIN/tj1.cmd

    r18 r32  
    1 lucide D:\Projects\lucide\trunk\Lucide\lizard2003-navm.djvu
     1start /f lucide D:\Projects\lucide\trunk\Lucide\lizard2003-navm.djvu
  • trunk/Lucide/SOURCE/gui/docViewer.cpp

    r28 r32  
    279279{
    280280    zoom = _zoom;
     281
    281282    if ( doc != NULL ) {
    282283        drawPage();
     
    421422    if ( continuous )
    422423    {
    423         adjustSize();
    424424        WinSendMsg( hWndDoc, WM_SIZE, MPFROM2SHORT( cxClient, cyClient ),
    425425                    MPFROM2SHORT( cxClient, cyClient ) );
     
    438438
    439439        Lucide::enableCopy( false );
    440         adjustSize();
    441         sVscrollPos = 0;
    442440        WinSendMsg( hWndDoc, WM_SIZE, MPFROM2SHORT( cxClient, cyClient ),
    443441                    MPFROM2SHORT( cxClient, cyClient ) );
     
    531529    cxClient = SHORT1FROMMP( mp2 );
    532530    cyClient = SHORT2FROMMP( mp2 );
     531
     532    double relativeScrollPos = (double)sVscrollPos / (double)sVscrollMax;
    533533
    534534    adjustSize();
     
    582582    }
    583583    WinEnableWindow( hWndVscroll, (BOOL)( sVscrollMax != 0 ) );
     584
     585    SHORT realScrollPos = (SHORT)(sVscrollMax * relativeScrollPos);
     586    vertScroll( hWndDoc, MPFROM2SHORT( realScrollPos, SB_SLIDERPOSITION ), NULLHANDLE );
    584587}
    585588
Note: See TracChangeset for help on using the changeset viewer.