Skip to content
Snippets Groups Projects
Commit 2cd9f2f6 authored by gambas's avatar gambas
Browse files

Some fixes in project tree and version control highlight.

[DEVELOPMENT ENVIRONMENT]
* BUG: Project tree: Fix drawing of compressed files icons.
* BUG: Version control: Highlight the "merge" lines in Git history.
parent d0fa82d8
No related branches found
No related tags found
No related merge requests found
Pipeline #259271539 passed
......@@ -712,7 +712,9 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer, hStat As Stat
iSize += 4
hImage = New Image(hThumb.W + 4, hThumb.H + 4, Color.Transparent)
hImage.DrawImage(hThumb, 2, 2)
hImage.DrawRect(0, 0, hImage.W, hImage.H, Color.Merge(Color.TextBackground, Color.LightForeground))
Paint.Begin(hImage)
Paint.DrawRect(0, 0, hImage.W, hImage.H, Color.Merge(Color.TextBackground, Color.LightForeground))
Paint.End
Else
......
......@@ -17,7 +17,9 @@ Private $sRoot As String
Private $bCanControl As Boolean
Private $bCanInit As Boolean
Private $bHasRemote As Boolean
Private $iPadHistory As Integer
Private $hHighlightDiff As TextHighlighter
Private Sub Init()
......@@ -512,16 +514,25 @@ Public Sub HighlightHistory(Text As String)
If Text Begins "commit " Then
TextHighlighter.TextAfter = String.PadRight("Commit", $iPadHistory) & " : " & Mid$(Text, 8)
TextHighlighter.Add(Highlight.DataType, String.Len(TextHighlighter.TextAfter))
'TextHighlighter.Add(Highlight.DataType, String.Len(Text))
TextHighlighter.Limit = True
Else If Text Begins "Merge: " Then
TextHighlighter.TextAfter = String.PadRight("Merge", $iPadHistory) & " : " & Mid$(Text, 8)
TextHighlighter.Add(Highlight.Number, String.Len(TextHighlighter.TextAfter))
'TextHighlighter.Add(Highlight.DataType, String.Len(Text))
TextHighlighter.Limit = True
Else If Text Begins "Author: " Then
TextHighlighter.TextAfter = String.PadRight(("Author"), $iPadHistory) & " : " & Mid$(Text, 9)
TextHighlighter.Add(Highlight.Function, String.Len(TextHighlighter.TextAfter))
'TextHighlighter.Add(Highlight.Function, String.Len(Text))
Else If Text Begins "Date: " Then
TextHighlighter.TextAfter = String.PadRight(("Date"), $iPadHistory) & " : " & FormatDate(Mid$(Text, 7))
TextHighlighter.Add(Highlight.Preprocessor, String.Len(TextHighlighter.TextAfter))
'TextHighlighter.Add(Highlight.Preprocessor, String.Len(Text))
Else
TextHighlighter.Alternate = False
TextHighlighter["diff"].Run(Text)
If Not $hHighlightDiff Then $hHighlightDiff = TextHighlighter["diff"]
$hHighlightDiff.Run(Text)
'TextHighlighter.Add(Highlight.Normal, iLen)
Endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment