Skip to content

Commit 98630d1

Browse files
authored
Merge pull request #202 from taooceros/theme_folder_quicklink
Add quicklink to customized theme folder
2 parents 9d8f18f + 83ccfac commit 98630d1

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class Theme
2121
private ResourceDictionary _oldResource;
2222
private string _oldTheme;
2323
public Settings Settings { get; set; }
24-
private const string Folder = "Themes";
24+
private const string Folder = Constant.Themes;
2525
private const string Extension = ".xaml";
2626
private string DirectoryPath => Path.Combine(Constant.ProgramDirectory, Folder);
2727
private string UserDirectoryPath => Path.Combine(DataLocation.DataDirectory(), Folder);

Flow.Launcher.Infrastructure/Constant.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ public static class Constant
3333
public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.png";
3434

3535
public const string DefaultTheme = "Darker";
36+
37+
public const string Themes = "Themes";
3638
}
3739
}

Flow.Launcher/SettingWindow.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
<TextBlock Text="{Binding PluginPair.Metadata.Description}"
173173
Grid.Row="1" Opacity="0.5" />
174174
<DockPanel Grid.Row="2" Margin="0 10 0 8" HorizontalAlignment="Right">
175-
175+
176176
<TextBlock Text="{DynamicResource actionKeywords}"
177177
Visibility="{Binding ActionKeywordsVisibility}"
178178
Margin="20 0 0 0"/>
@@ -211,10 +211,10 @@
211211
<Run Text="{DynamicResource browserMoreThemes}" />
212212
</Hyperlink>
213213
</TextBlock>
214+
<Button DockPanel.Dock="Top" Margin="0,10,0,0" Width="180" HorizontalAlignment="Center" Click="OpenPluginFolder">Open Theme Folder</Button>
215+
<ListBox DockPanel.Dock="Top" SelectedItem="{Binding SelectedTheme}" ItemsSource="{Binding Themes}"
216+
Margin="10, 0, 10, 10" Width="180" Height="394" />
214217

215-
<ListBox SelectedItem="{Binding SelectedTheme}" ItemsSource="{Binding Themes}"
216-
Margin="10, 0, 10, 10" Width="180"
217-
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
218218
</DockPanel>
219219
<Grid Margin="0" Grid.Column="1">
220220
<Grid.RowDefinitions>

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using NHotkey.Wpf;
99
using Flow.Launcher.Core.Plugin;
1010
using Flow.Launcher.Core.Resource;
11+
using Flow.Launcher.Infrastructure;
1112
using Flow.Launcher.Infrastructure.Hotkey;
1213
using Flow.Launcher.Infrastructure.UserSettings;
1314
using Flow.Launcher.Plugin;
@@ -275,5 +276,10 @@ private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e)
275276
{
276277
Close();
277278
}
279+
280+
private void OpenPluginFolder(object sender, RoutedEventArgs e)
281+
{
282+
FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes));
283+
}
278284
}
279285
}

0 commit comments

Comments
 (0)