Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#385 wgnuplot textwin width

closed-accepted
nobody
None
5
2008-06-02
2008-05-24
Tim Hoffmann
No

This is a small patch which accounts for scrollbars when shrinking the textwin to the maximally needed width.

Because the scrollbar was not accounted for in the calculation of the client width, the end of the line was covered by the vertical scrollbar.

Discussion

  • Tim Hoffmann
    Tim Hoffmann
    2008-05-24

    Patch for width of textwin

     
    Attachments
  • Petr Mikulik
    Petr Mikulik
    2008-06-01

    Logged In: YES
    user_id=31505
    Originator: NO

    I've tried the patch, I haven't noticed any change in the textwin behaviour. Could anybody else comment on this patch?

     
  • Tim Hoffmann
    Tim Hoffmann
    2008-06-02

    screenshots with and without patch

     
    Attachments
  • Tim Hoffmann
    Tim Hoffmann
    2008-06-02

    Logged In: YES
    user_id=1903580
    Originator: YES

    Maybe I wasn't clear in the description.

    The code near /* shrink x size */ in wtext.c WndParentProc() limits the window width to the linewidth of the of the 'console' (80 chars?). So even if a larger value is stored in wgnuplot.ini the window will not be larger at startup. This is reasonable because there won't be displayed anything in the additional space. The client width of textwin was calculated as charwidth*(number of chars). Then the vertical scrollbar covers the last few characters of a line and a horizontal scrollbar is necessary.
    Patch: I simply changed the calculation to charwidth*(number of chars) + (width of vertical scrollbar). So the line ends are not covered and there is no need for the horizontal scrollbar.

    See the screenshots attached. (The mail addresses end at the last char of the console.)
    File Added: screenshots.tar

     
  • Petr Mikulik
    Petr Mikulik
    2008-06-02

    Logged In: YES
    user_id=31505
    Originator: NO

    Thanks, committed.

     
  • Petr Mikulik
    Petr Mikulik
    2008-06-02

    • status: open --> closed-accepted