From 2bec336ef036a8c520eae28520ee904fd56941b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 11 Dec 2022 23:08:25 +0100 Subject: [PATCH] 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. --- comp/src/gb.form/.src/File/FileView.class | 116 +++++++++++----------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/comp/src/gb.form/.src/File/FileView.class b/comp/src/gb.form/.src/File/FileView.class index c1e6f84be..03b9e591e 100644 --- a/comp/src/gb.form/.src/File/FileView.class +++ b/comp/src/gb.form/.src/File/FileView.class @@ -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