@@ -41,6 +41,14 @@ public int RowHeightListView
4141 {
4242 get => LayoutSizeKindHelper . GetListViewRowHeight ( UserSettingsService . LayoutSettingsService . ListViewSize ) ;
4343 }
44+
45+ /// <summary>
46+ /// Icon Box size in the List View layout. The value is increased by 4px to account for icon overlays.
47+ /// </summary>
48+ public int IconBoxSizeListView
49+ {
50+ get => ( int ) ( LayoutSizeKindHelper . GetIconSize ( FolderLayoutModes . ListView ) + 4 ) ;
51+ }
4452
4553 /// <summary>
4654 /// Item width in the Tiles View layout
@@ -127,7 +135,7 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
127135
128136 base . OnNavigatedTo ( eventArgs ) ;
129137
130- currentIconSize = FolderSettings . GetRoundedIconSize ( ) ;
138+ currentIconSize = LayoutSizeKindHelper . GetIconSize ( FolderSettings . LayoutMode ) ;
131139
132140 FolderSettings . LayoutModeChangeRequested -= FolderSettings_LayoutModeChangeRequested ;
133141 FolderSettings . LayoutModeChangeRequested += FolderSettings_LayoutModeChangeRequested ;
@@ -162,10 +170,10 @@ private void LayoutSettingsService_PropertyChanged(object? sender, PropertyChang
162170 if ( e . PropertyName == nameof ( ILayoutSettingsService . ListViewSize ) )
163171 {
164172 NotifyPropertyChanged ( nameof ( RowHeightListView ) ) ;
173+ NotifyPropertyChanged ( nameof ( IconBoxSizeListView ) ) ;
165174
166175 // Update the container style to match the item size
167176 SetItemContainerStyle ( ) ;
168-
169177 FolderSettings_IconHeightChanged ( ) ;
170178 }
171179 if ( e . PropertyName == nameof ( ILayoutSettingsService . TilesViewSize ) )
@@ -182,7 +190,6 @@ private void LayoutSettingsService_PropertyChanged(object? sender, PropertyChang
182190
183191 // Update the container style to match the item size
184192 SetItemContainerStyle ( ) ;
185-
186193 FolderSettings_IconHeightChanged ( ) ;
187194 }
188195
@@ -200,7 +207,7 @@ private async void FolderSettings_LayoutModeChangeRequested(object? sender, Layo
200207 SetItemTemplate ( ) ;
201208 SetItemContainerStyle ( ) ;
202209
203- var requestedIconSize = FolderSettings . GetRoundedIconSize ( ) ;
210+ var requestedIconSize = LayoutSizeKindHelper . GetIconSize ( FolderSettings . LayoutMode ) ;
204211 if ( requestedIconSize != currentIconSize )
205212 {
206213 currentIconSize = requestedIconSize ;
@@ -491,7 +498,7 @@ protected override bool CanGetItemFromElement(object element)
491498 private async void FolderSettings_IconHeightChanged ( )
492499 {
493500 // Get new icon size
494- var requestedIconSize = FolderSettings . GetRoundedIconSize ( ) ;
501+ var requestedIconSize = LayoutSizeKindHelper . GetIconSize ( FolderSettings . LayoutMode ) ;
495502
496503 // Prevents reloading icons when the icon size hasn't changed
497504 if ( requestedIconSize != currentIconSize )
0 commit comments