Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SDK
KDiff3
Commits
483d1184
Commit
483d1184
authored
Sep 11, 2012
by
Joachim Eibl
Browse files
Fix for word wrap.
Signed-off-by:
joachim99
<
joachim.eibl@gmx.de
>
parent
de8f67d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
kdiff3/ChangeLog
View file @
483d1184
Version 0.9.98a - 2012-09-11
============================
- Text rendering now with QTextLayout fixes the following issues
- Correct handling for variable width fonts.
- Corrected display of highlighted text with Qt4.8.x on Ubuntu and Mac.
- Improved handling of texts with both right to left and left to right languages (mixed Arabic and western texts).
- Improved handling of Chinese and Japanese.
Version 0.9.97 - 2012-08-10
===========================
- Memory usage optimized for comparison of large directories. (ca. 1/5 needed)
...
...
kdiff3/src-QT4/difftextwindow.cpp
View file @
483d1184
...
...
@@ -799,6 +799,9 @@ void DiffTextWindowData::prepareTextLayout( QTextLayout& textLayout, bool bFirst
textOption
.
setFlags
(
QTextOption
::
ShowTabsAndSpaces
);
if
(
m_pOptions
->
m_bRightToLeftLanguage
)
textOption
.
setAlignment
(
Qt
::
AlignRight
);
// only relevant for multi line text layout
if
(
visibleTextWidth
>=
0
)
textOption
.
setWrapMode
(
QTextOption
::
WrapAtWordBoundaryOrAnywhere
);
textLayout
.
setTextOption
(
textOption
);
if
(
m_pOptions
->
m_bShowWhiteSpaceCharacters
)
...
...
kdiff3/src-QT4/mergeresultwindow.cpp
View file @
483d1184
...
...
@@ -550,6 +550,7 @@ int MergeResultWindow::getMaxTextWidth()
}
}
}
m_maxTextWidth
+=
5
;
// cursorwidth
}
return
m_maxTextWidth
;
}
...
...
@@ -2525,11 +2526,11 @@ void MergeResultWindow::keyPressEvent( QKeyEvent* e )
m_cursorXPos
=
newCursorX
;
// TODO if width of current line exceeds the current maximum width then force recalculating the scrollbars
//
if (
m_cursorXPos>m_nofColumns
)
//
{
//
m_
nofColumns = m_cursorXPos
;
//
emit resizeSignal();
//
}
if
(
textLayout
.
maximumWidth
()
>
getMaxTextWidth
()
)
{
m_
maxTextWidth
=
textLayout
.
maximumWidth
()
;
emit
resizeSignal
();
}
if
(
!
bYMoveKey
)
m_cursorOldXPixelPos
=
m_cursorXPixelPos
;
...
...
@@ -2805,8 +2806,6 @@ void MergeResultWindow::resetSelection()
void
MergeResultWindow
::
setModified
(
bool
bModified
)
{
if
(
bModified
)
m_maxTextWidth
=
-
1
;
if
(
bModified
!=
m_bModified
)
{
m_bModified
=
bModified
;
...
...
kdiff3/src-QT4/version.h
View file @
483d1184
#undef VERSION
#define VERSION "0.9.9
7
"
#define VERSION "0.9.9
8a
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment