FileView: Remove file details in icon view mode. It's ugly.

[GB.FORM]
* NEW: FileView: Remove file details in icon view mode. It's ugly.
This commit is contained in:
Benoît Minisini 2022-12-11 23:08:25 +01:00
parent 28e6ed3b71
commit 2bec336ef0

View file

@ -1318,64 +1318,64 @@ Public Sub Watcher_Resize()
End
Public Sub View_Draw(X As Integer, Y As Integer, Width As Integer, Height As Integer, (Key) As String, Optional (Column) As Integer)
'Dim iSize As Long
'Dim hFont As Font
Dim H As Integer
Dim hStat As Stat
Dim dDate As Date
Dim sDate As String
Dim sAuth As String
If Not $hIconView.Visible Then Return
H = $hInfoFont.H
If $iIconSize < (H * 5) Then Return
Try hStat = DirCache[$sDir].GetInfo(Mid$(Key, 2))
'Try hStat = Stat($sDir &/ Mid$(Key, 2))
If Error Then Return
Paint.Background = Color.Merge(Style.ForegroundOf(Last), Style.BackgroundOf(Last), 0.3)
If Me.RightToLeft Then
Width = (Width - $iIconSize - H) \ 2
Else
X += (Width + $iIconSize + H) \ 2
Endif
'Paint.Save
Paint.Font = $hInfoFont
Y += Desktop.Scale
Paint.DrawText(Main.FormatSize(hStat.Size), X, Y, Width, Height, Align.TopNormal)
'If $iIconSize < (H * 5) Then Return
dDate = hStat.LastModified
If Date(dDate) = Date(Now) Then
sDate = Format(dDate, gb.LongTime)
Else If Year(dDate) = Year(Now) Then
sDate = Format(dDate, "dd mmm")
Else If $iIconSize < (H * 6) Then
sDate = Format(dDate, "mmm yyyy")
Else
sDate = Format(dDate, gb.MediumDate)
Endif
Y += H * 1.25
Paint.DrawText(sDate, X, Y, Width, Height, Align.TopNormal)
If $iIconSize < (H * 6) Then Return
sAuth = hStat.Auth
sAuth = Left(sAuth, 3) & " " & Mid$(sAuth, 4, 3) & " " & Mid$(sAuth, 7)
Y += H * 1.25
Paint.DrawText(sAuth, X, Y, Width, Height, Align.TopNormal)
End
' Public Sub View_Draw(X As Integer, Y As Integer, Width As Integer, Height As Integer, (Key) As String, Optional (Column) As Integer)
'
' 'Dim iSize As Long
' 'Dim hFont As Font
' Dim H As Integer
' Dim hStat As Stat
' Dim dDate As Date
' Dim sDate As String
' Dim sAuth As String
'
' If Not $hIconView.Visible Then Return
'
' H = $hInfoFont.H
'
' If $iIconSize < (H * 5) Then Return
'
' Try hStat = DirCache[$sDir].GetInfo(Mid$(Key, 2))
' 'Try hStat = Stat($sDir &/ Mid$(Key, 2))
' If Error Then Return
'
' Paint.Background = Color.Merge(Style.ForegroundOf(Last), Style.BackgroundOf(Last), 0.3)
'
' If Me.RightToLeft Then
' Width = (Width - $iIconSize - H) \ 2
' Else
' X += (Width + $iIconSize + H) \ 2
' Endif
' 'Paint.Save
' Paint.Font = $hInfoFont
'
' Y += Desktop.Scale
' Paint.DrawText(Main.FormatSize(hStat.Size), X, Y, Width, Height, Align.TopNormal)
'
' 'If $iIconSize < (H * 5) Then Return
'
' dDate = hStat.LastModified
' If Date(dDate) = Date(Now) Then
' sDate = Format(dDate, gb.LongTime)
' Else If Year(dDate) = Year(Now) Then
' sDate = Format(dDate, "dd mmm")
' Else If $iIconSize < (H * 6) Then
' sDate = Format(dDate, "mmm yyyy")
' Else
' sDate = Format(dDate, gb.MediumDate)
' Endif
'
' Y += H * 1.25
' Paint.DrawText(sDate, X, Y, Width, Height, Align.TopNormal)
'
' If $iIconSize < (H * 6) Then Return
'
' sAuth = hStat.Auth
' sAuth = Left(sAuth, 3) & " " & Mid$(sAuth, 4, 3) & " " & Mid$(sAuth, 7)
'
' Y += H * 1.25
' Paint.DrawText(sAuth, X, Y, Width, Height, Align.TopNormal)
'
' End
Private Function Path_Read() As String