Improvement on the editor preview bar
[GB.FORM.EDITOR] * BUG: The preview not display end of line spaces as characters and display only the 100 first characters.
This commit is contained in:
parent
0b73beec1d
commit
6dfd509078
2 changed files with 9 additions and 8 deletions
|
@ -12,8 +12,8 @@ Private Sub Reload()
|
|||
' System.Profile = True
|
||||
|
||||
'TextEditor1.Highlight = "gambas"
|
||||
TextEditor1.Load("~/gambas/3.0/test/test-git/CHANGELOG", True)
|
||||
'TextEditor1.Load("~/gambas/comp/src/gb.form.editor/.src/CLineInfo.class", True)
|
||||
'TextEditor1.Load("~/gambas/3.0/test/test-git/CHANGELOG", True)
|
||||
TextEditor1.Load("~/Documents/gambas/comp/src/gb.form.editor/.src/CLineInfo.class", True)
|
||||
'TextEditor1.Load("~/Fichier texte")
|
||||
TextEditor1.Styles[Highlight.Custom].Background = Color.SetAlpha(Color.Red, 224)
|
||||
TextEditor1.Styles[Highlight.Custom + 1].Background = Color.SetAlpha(Color.Green, 224)
|
||||
|
|
|
@ -4879,7 +4879,7 @@ Private Sub DrawBarImage3()
|
|||
Dim hInfo As CLineInfo
|
||||
Dim iCol As Integer
|
||||
Dim J As Integer
|
||||
Dim FX As Integer
|
||||
Dim FX As Float
|
||||
Dim bModified As Boolean
|
||||
Dim bSaved As Boolean
|
||||
Dim iAlpha As Integer
|
||||
|
@ -4902,7 +4902,7 @@ Private Sub DrawBarImage3()
|
|||
H = (N + F - 1) \ F
|
||||
Endif
|
||||
|
||||
FX = Max(4, Min(8, F))
|
||||
FX = (Paint.w - 4) / 100 'Max(4, Min(8, F))
|
||||
|
||||
iAlpha = 255 - 128 \ F
|
||||
iColComment = Color.SetAlpha($hStyles[Highlight.Comment].Color, iAlpha)
|
||||
|
@ -4923,11 +4923,12 @@ Private Sub DrawBarImage3()
|
|||
For J = I To Min(N, I + F - 1)
|
||||
|
||||
iRow = _ViewToReal(J)
|
||||
iLen = aLineLength[iRow]
|
||||
sLine = RTrim(aLines[iRow])
|
||||
iLen = Min(String.Len(sLine), 100)
|
||||
|
||||
If iLen > 0 Then
|
||||
If sLine Then
|
||||
|
||||
sLine = aLines[iRow]
|
||||
sLine = RTrim(aLines[iRow])
|
||||
hInfo = aLinesInfo[iRow]
|
||||
|
||||
X = 0
|
||||
|
@ -4944,7 +4945,7 @@ Private Sub DrawBarImage3()
|
|||
iCol = iColNormal
|
||||
Endif
|
||||
|
||||
Paint.FillRect(X / FX + 5, Y, (iLen - X) / FX, 1, iCol)
|
||||
Paint.FillRect(X * FX + 5, Y, (iLen - X) * FX, 1, iCol)
|
||||
|
||||
Endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue