[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 228697] [testcase] form's textarea size patch
From:       Andrea Iacovitti <aiacovitti () libero ! it>
Date:       2010-02-28 11:34:48
Message-ID: 20100228113448.EA718357CE () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=228697





--- Comment #4 from Andrea Iacovitti <aiacovitti libero it>  2010-02-28 12:34:47 ---
Thanks for usefull information (at least for me) you feedback!

> hmmm, indeed the fudge factor on the horizontal axis looks acceptable. It would
> be best though if it was as small as possible, as our textareas are already
> bigger than in other UAs [*].
> It seems 0.2 would be enough for me with all monospaced fonts, doesn't it for
> you?

Retested.
Yes 0.2 is enough if using default fonts size: currently for me minimum/medium
= 7/12.
What happened is that i normally use konq with those settings: minimum/medium =
8/9, where 0.2 was not enough, that's why i came to get 0.3 as a factor....
(i have 90dpi from X server)

> As for the vertical fudging, I'm not so sure the value is correct.
> You testcase defines 5 rows, but then proceeds with a 6 rows default text (the
> last being empty, but still existing because of the last newline before
> </textarea>).

Yes! shame on me.

> Other browsers do force vertical scrollbars at most sizes with such a default.
> 
> Besides, these:
> -                (w->lineWrapMode() == QTextEdit::NoWrap ?
> -                 w->horizontalScrollBar()->sizeHint().height()+lvs : 0)
> 
> are there to match the way MSIE sizes nowrap textareas
> (I just verified this still work like this in ie7, with wine).
> Is there a good reason to align our sizing on Mozilla when we are known to do
> that MSIE-style since a decade?

...may be i have found one :-) after removing last newline from textarea in the
testcase and testing with the original code about vertical size calculations,
that's with this code:

qMax(element()->rows(), 1L)*m.lineSpacing() + vfw + lbm+ltm +
                (w->lineWrapMode() == QTextEdit::NoWrap ?
                 w->horizontalScrollBar()->sizeHint().height()+lvs : 0)

If i still test with minimum/medium size = 8/9 a ugly vertical scrollbar appear
on wrapping textarea elements;that's not the case if horizontal scroolbar vsize
is added to textarea vsize determination regardless of Wrap/NoWrap mode (as it
seems FF do) at the price not matching MSIE.

Well... seems there are many factors to take into account that makes fine
tuning hard, sure you know better than me what is the better choice to make...

I will continue to support on testing if needed.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic