Ignore:
Timestamp:
Nov 16, 2008, 11:36:11 PM (17 years ago)
Author:
pr
Message:

Fix scroll bar bugs in textview control. Bug 1086.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/textview.c

    r243 r373  
    183183
    184184/*
    185  *      Copyright (C) 2000 Ulrich M”ller.
     185 *      Copyright (C) 2000-2008 Ulrich M”ller.
    186186 *      This program is part of the XWorkplace package.
    187187 *      This program is free software; you can redistribute it and/or modify
     
    11001100 *
    11011101 *@@changed V0.9.3 (2000-05-06) [umoeller]: largely rewritten; now handling paragraph and character formats
     1102 *@@changed V1.0.18 (2008-11-16) [pr]: bodge formatting to remove unwanted scroll bars @@fixes 1086
    11021103 *@@todo TXVWORDF_GLUEWITHNEXT
    11031104 */
     
    13101311                            {
    13111312                                // yes: check if the word still fits
    1312                                 if (    (flbuf.lXCurrent + pWordThis->ulCXWithSpaces // ###
     1313                                // WarpIN V1.0.18 @@todo add fudge factor of 2 - makes things work
     1314                                if (    (flbuf.lXCurrent + pWordThis->ulCXWithSpaces + 2
    13131315                                             > prclView->xRight)
    13141316                                             // > ulWinCX)
     
    19541956 *      -- rclViewText: the text subrectangle (which
    19551957 *         is rclViewPaint minus borders).
     1958 *
     1959 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: fix cut/paste/typo. errors @@fixes 1086
    19561960 */
    19571961
     
    19841988    ptxvd->rclViewText.yBottom = ptxvd->rclViewPaint.yBottom + ptxvd->cdata.ulYBorder;
    19851989    ptxvd->rclViewText.xRight = ptxvd->rclViewPaint.xRight - ptxvd->cdata.ulXBorder;
    1986     ptxvd->rclViewText.yTop = ptxvd->rclViewPaint.yTop - ptxvd->cdata.ulXBorder;
     1990    ptxvd->rclViewText.yTop = ptxvd->rclViewPaint.yTop - ptxvd->cdata.ulYBorder;  // WarpIN V1.0.18
    19871991
    19881992    // now reposition scroll bars; their sizes may change
     
    19941998        ulOfs = 0;
    19951999        if (ptxvd->fHScrollVisible)
    1996             ulOfs = ulScrollCX;
     2000            ulOfs = ulScrollCY;  // WarpIN V1.0.18
    19972001        WinSetWindowPos(ptxvd->scrw.hwndVScroll,
    19982002                        HWND_TOP,
     
    20262030 *
    20272031 *@@changed V0.9.3 (2000-05-05) [umoeller]: fixed buggy vertical scroll bars
     2032 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: fix buggy horiz. scroll bars @@fixes 1086
    20282033 */
    20292034
     
    21022107                    AdjustViewRects(hwndTextView,
    21032108                                    ptxvd);
     2109                    FormatText2Screen(hwndTextView,  // WarpIN V1.0.18
     2110                                      ptxvd,
     2111                                      TRUE,   // fAlreadyRecursing
     2112                                      FALSE);   // quick format
    21042113                }
    21052114        }
     
    25622571 *
    25632572 *@@added V1.0.1 (2003-01-25) [umoeller]
     2573 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: check for horiz. scroll message @@fixes 1086
    25642574 */
    25652575
     
    25852595                                              mp2);
    25862596        }
    2587         else if (ptxvd->fHScrollVisible)
     2597        else if (    (msg == WM_HSCROLL)  // WarpIN V1.0.18
     2598                  && (ptxvd->fHScrollVisible)
     2599                )
    25882600        {
    25892601            LONG cx = ptxvd->rclViewText.xRight - ptxvd->rclViewText.xLeft;
     
    27862798 *
    27872799 *@@added V1.0.0 (2002-08-12) [umoeller]
     2800 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: added correct ID for horiz. scroll @@fixes 1086
    27882801 */
    27892802
     
    28232836                    ulMsg = WM_HSCROLL;
    28242837                    usCmd = SB_LINERIGHT;
     2838                    usID = ID_HSCROLL;  // WarpIN V1.0.18
    28252839                break;
    28262840
     
    28282842                    ulMsg = WM_HSCROLL;
    28292843                    usCmd = SB_LINELEFT;
     2844                    usID = ID_HSCROLL;  // WarpIN V1.0.18
    28302845                break;
    28312846
     
    28572872                        ulMsg = WM_VSCROLL;
    28582873                    else
     2874                    {
    28592875                        ulMsg = WM_HSCROLL;
     2876                        usID = ID_HSCROLL;  // WarpIN V1.0.18
     2877                    }
    28602878
    28612879                    sPos = 0;
     
    28742892                        ulMsg = WM_HSCROLL;
    28752893                        sPos = ptxvd->xfd.szlWorkspace.cx;
     2894                        usID = ID_HSCROLL;  // WarpIN V1.0.18
    28762895                    }
    28772896
Note: See TracChangeset for help on using the changeset viewer.