Dylan Smith : richedit: Don' t show vertical scrollbar for single line controls.

Alexandre Julliard julliard at winehq.org
Tue Feb 24 10:21:22 CST 2009


Module: wine
Branch: master
Commit: a0466e2c0eb25fc0c2c6db1fbcca00b42be1d941
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a0466e2c0eb25fc0c2c6db1fbcca00b42be1d941

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Tue Feb 24 02:37:21 2009 -0500

richedit: Don't show vertical scrollbar for single line controls.

The vertical scrollbar is not shown when the ES_MULTILINE style isn't
used, unless ES_DISBALENOSCROLL is also used.

---

 dlls/riched20/paint.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 35ca097..f235082 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -1071,7 +1071,8 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
 
     bScrollBarIsVisible = (winStyle & WS_VSCROLL) != 0;
     bScrollBarWillBeVisible = (editor->nTotalLength > editor->sizeWindow.cy
-                               && (editor->styleFlags & WS_VSCROLL))
+                               && (editor->styleFlags & WS_VSCROLL)
+                               && (editor->styleFlags & ES_MULTILINE))
                               || (editor->styleFlags & ES_DISABLENOSCROLL);
     if (bScrollBarIsVisible != bScrollBarWillBeVisible)
       ITextHost_TxShowScrollBar(editor->texthost, SB_VERT,
@@ -1174,7 +1175,8 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
 
   /* Update vertical scrollbar */
   bScrollBarWasVisible = editor->vert_si.nMax > editor->vert_si.nPage;
-  bScrollBarWillBeVisible = editor->nTotalLength > editor->sizeWindow.cy;
+  bScrollBarWillBeVisible = editor->nTotalLength > editor->sizeWindow.cy &&
+                            (editor->styleFlags & ES_MULTILINE);
 
   if (editor->vert_si.nPos && !bScrollBarWillBeVisible)
   {




More information about the wine-cvs mailing list