Bug 262210

Summary: email composer: main text entry field adds a vertical scrollbar and grows, so the whole screen scrolls
Product: [Applications] KMail Mobile Reporter: Bernhard E. Reiter <bernhard>
Component: generalAssignee: Ludwig Reiter <ludwig.reiter>
Status: VERIFIED FIXED    
Severity: normal CC: aheinecke
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Windows CE   
OS: Microsoft Windows CE   
Latest Commit: Version Fixed In:

Description Bernhard E. Reiter 2011-01-05 17:26:12 UTC
When there is more text in the email composer entry field for Kontact Touch,
the field grows which makes the whole subarea scroll, including the lower buttons. In addition a scrollbar is added, which is useless because of the growth. I suggest to use only the scrollbar, this way the buttons always stay reachable. 

HTC Touch Pro2
    snapshots/kdepim-ce-package_2011-01-05-06-28

(The growth also happens on N900 20101218 version, but not scrollbar there.)
Comment 1 Volker Krause 2011-01-06 09:59:49 UTC
Reproduceable also on the desktop. The growth code probably misses a few pixel and thus the scrollbar is shown. The growth instead of the scrollbar is actually intentional, in order to maximize editing space, so I'd rather fix the scrollbar to not show up.
Comment 2 Bernhard E. Reiter 2011-01-06 11:30:20 UTC
The problem with growing the area is, that with long emails, you cannot reach the buttons easily anymore, so information you would like to see is out of
sight and you cannot directly go on. I am not entirely sure, but I have a slight tendency for the scrollbar solution.
Comment 3 Volker Krause 2011-01-06 16:45:48 UTC
commit d306d21f011de10a55fedb792b8f3067f920459e
branch master
Author: Volker Krause <vkrause@kde.org>
Date:   Thu Jan 6 16:43:11 2011 +0100

    Fix off by one error causing the scrollbar to show up.
    
    BUG: 262210

diff --git a/mobile/mail/composerautoresizer.cpp b/mobile/mail/composerautoresizer.cpp
index 520c040..8f46cf7 100644
--- a/mobile/mail/composerautoresizer.cpp
+++ b/mobile/mail/composerautoresizer.cpp
@@ -67,8 +67,8 @@ void ComposerAutoResizer::textEditChanged()
   const QRect contentsRect = mEdit->contentsRect();
 
   // sets the size of the widget dynamically
-  mEdit->setMinimumHeight( qMax( mMinimumHeight, size.height() + (frameRect.height() - contentsRect.height() - 1) ) );
-  mEdit->setMaximumHeight( qMax( mMinimumHeight, size.height() + (frameRect.height() - contentsRect.height() - 1) ) );
+  mEdit->setMinimumHeight( qMax( mMinimumHeight, size.height() + (frameRect.height() - contentsRect.height()) ) );
+  mEdit->setMaximumHeight( qMax( mMinimumHeight, size.height() + (frameRect.height() - contentsRect.height()) ) );
 
   const QGraphicsProxyWidget *proxy = mEdit->graphicsProxyWidget();
   QGraphicsItem *proxyItem = proxy->parentItem();
Comment 4 Ludwig Reiter 2011-02-22 14:23:23 UTC
Kontact Touch Windows CE 20110218 22:55

If a long text is entered, the textfield of the composer grows in the top.
So the buttons at the bottom are visible.
No scrollbar is displayed.

Ok for me 
Verified.