mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 19:27:40 +00:00
Tweak size calculation so that the insertion point doesn't disappear at the end of field editors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18101 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
266578092f
commit
862a3578ff
2 changed files with 17 additions and 1 deletions
|
@ -1432,7 +1432,18 @@ incorrectly. */
|
|||
if (!_tf.is_horizontally_resizable)
|
||||
size.width = _bounds.size.width;
|
||||
else
|
||||
size.width += 2 * _textContainerInset.width;
|
||||
{
|
||||
size.width += 2 * _textContainerInset.width;
|
||||
|
||||
/*
|
||||
The +1 is to make sure that we always have one extra point on the right
|
||||
where we can draw the insertion pointer for a character that touches
|
||||
the right edge. This is a bit of a hack, but the insertion pointer
|
||||
often disappears in field editors without this.
|
||||
*/
|
||||
if (!_textContainerInset.width)
|
||||
size.width += 1;
|
||||
}
|
||||
|
||||
if (!_tf.is_vertically_resizable)
|
||||
size.height = _bounds.size.height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue