Skip to content

Commit dd1a83f

Browse files
committed
Moved cache settings to Experimental
1 parent 133469b commit dd1a83f

2 files changed

Lines changed: 37 additions & 53 deletions

File tree

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,8 @@
228228
<data name="Advanced" xml:space="preserve">
229229
<value>Advanced</value>
230230
</data>
231-
<data name="ThumbnailCache" xml:space="preserve">
232-
<value>Thumbnail Cache</value>
233-
</data>
234-
<data name="EnableThumbnailCache" xml:space="preserve">
235-
<value>Enable Thumbnail Cache</value>
236-
</data>
237-
<data name="EnableThumbnailCacheDescription" xml:space="preserve">
238-
<value>Cache thumbnails to disk for faster loading.</value>
231+
<data name="CacheThumbnails" xml:space="preserve">
232+
<value>Cache thumbnails</value>
239233
</data>
240234
<data name="CacheSizeLimitMB" xml:space="preserve">
241235
<value>Cache Size Limit (MB)</value>

src/Files.App/Views/Settings/AdvancedPage.xaml

Lines changed: 35 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -120,51 +120,6 @@
120120
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowSystemTrayIcon}" IsOn="{x:Bind ViewModel.ShowSystemTrayIcon, Mode=TwoWay}" />
121121
</wctcontrols:SettingsCard>
122122

123-
<!-- Thumbnail Cache -->
124-
<TextBlock
125-
Padding="0,16,0,4"
126-
FontSize="16"
127-
FontWeight="Medium"
128-
Text="{helpers:ResourceString Name=ThumbnailCache}" />
129-
130-
<!-- Enable Thumbnail Cache -->
131-
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=EnableThumbnailCache}" IsExpanded="False">
132-
<wctcontrols:SettingsExpander.Description>
133-
<TextBlock Text="{helpers:ResourceString Name=EnableThumbnailCacheDescription}" TextWrapping="WrapWholeWords" />
134-
</wctcontrols:SettingsExpander.Description>
135-
<wctcontrols:SettingsExpander.HeaderIcon>
136-
<FontIcon Glyph="&#xE74C;" />
137-
</wctcontrols:SettingsExpander.HeaderIcon>
138-
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=EnableThumbnailCache}" IsOn="{x:Bind ViewModel.EnableThumbnailCache, Mode=TwoWay}" />
139-
<wctcontrols:SettingsExpander.Items>
140-
141-
<!-- Cache Size Limit -->
142-
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=CacheSizeLimitMB}" IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
143-
<wctcontrols:SettingsCard.Description>
144-
<TextBlock Text="{helpers:ResourceString Name=CacheSizeLimitDescription}" TextWrapping="WrapWholeWords" />
145-
</wctcontrols:SettingsCard.Description>
146-
<NumberBox
147-
AutomationProperties.Name="{helpers:ResourceString Name=CacheSizeLimit}"
148-
Maximum="5000"
149-
Minimum="100"
150-
SpinButtonPlacementMode="Compact"
151-
Value="{x:Bind ViewModel.ThumbnailCacheSizeLimit, Mode=TwoWay}" />
152-
</wctcontrols:SettingsCard>
153-
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ClearCachedThumbnails}" IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
154-
<wctcontrols:SettingsCard.Description>
155-
<TextBlock>
156-
<Run Text="{helpers:ResourceString Name=CurrentCacheSize}" />
157-
<Run FontWeight="SemiBold" Text="{x:Bind ViewModel.CacheSizeText, Mode=OneWay}" />
158-
</TextBlock>
159-
</wctcontrols:SettingsCard.Description>
160-
<Button
161-
Command="{x:Bind ViewModel.ClearThumbnailCacheCommand}"
162-
Content="{helpers:ResourceString Name=ClearCache}"
163-
IsEnabled="{x:Bind ViewModel.IsClearCacheButtonEnabled, Mode=OneWay}" />
164-
</wctcontrols:SettingsCard>
165-
</wctcontrols:SettingsExpander.Items>
166-
</wctcontrols:SettingsExpander>
167-
168123
<!-- Experimental Settings -->
169124
<TextBlock
170125
Padding="0,16,0,4"
@@ -206,6 +161,41 @@
206161
</ToggleSwitch>
207162
</wctcontrols:SettingsCard>
208163

164+
<!-- Thumbnail Caching -->
165+
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=CacheThumbnails}" IsExpanded="False">
166+
<wctcontrols:SettingsExpander.HeaderIcon>
167+
<FontIcon Glyph="&#xEDA2;" />
168+
</wctcontrols:SettingsExpander.HeaderIcon>
169+
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=CacheThumbnails}" IsOn="{x:Bind ViewModel.EnableThumbnailCache, Mode=TwoWay}" />
170+
<wctcontrols:SettingsExpander.Items>
171+
172+
<!-- Cache Size Limit -->
173+
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=CacheSizeLimitMB}" IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
174+
<wctcontrols:SettingsCard.Description>
175+
<TextBlock Text="{helpers:ResourceString Name=CacheSizeLimitDescription}" TextWrapping="WrapWholeWords" />
176+
</wctcontrols:SettingsCard.Description>
177+
<NumberBox
178+
AutomationProperties.Name="{helpers:ResourceString Name=CacheSizeLimit}"
179+
Maximum="5000"
180+
Minimum="100"
181+
SpinButtonPlacementMode="Compact"
182+
Value="{x:Bind ViewModel.ThumbnailCacheSizeLimit, Mode=TwoWay}" />
183+
</wctcontrols:SettingsCard>
184+
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ClearCachedThumbnails}" IsEnabled="{x:Bind ViewModel.EnableThumbnailCache, Mode=OneWay}">
185+
<wctcontrols:SettingsCard.Description>
186+
<TextBlock>
187+
<Run Text="{helpers:ResourceString Name=CurrentCacheSize}" />
188+
<Run FontWeight="SemiBold" Text="{x:Bind ViewModel.CacheSizeText, Mode=OneWay}" />
189+
</TextBlock>
190+
</wctcontrols:SettingsCard.Description>
191+
<Button
192+
Command="{x:Bind ViewModel.ClearThumbnailCacheCommand}"
193+
Content="{helpers:ResourceString Name=ClearCache}"
194+
IsEnabled="{x:Bind ViewModel.IsClearCacheButtonEnabled, Mode=OneWay}" />
195+
</wctcontrols:SettingsCard>
196+
</wctcontrols:SettingsExpander.Items>
197+
</wctcontrols:SettingsExpander>
198+
209199
<!-- Flatten options -->
210200
<wctcontrols:SettingsCard Description="{helpers:ResourceString Name=ShowFlattenOptionsDescription}" Header="{helpers:ResourceString Name=ShowFlattenOptions}">
211201
<wctcontrols:SettingsCard.HeaderIcon>

0 commit comments

Comments
 (0)