Skip to content

Commit 8c3c0be

Browse files
committed
feature: add a button in Theme Overrides textbox to open sourcegit-theme repository directly
Signed-off-by: leo <longshuang@msn.cn>
1 parent 9e304d4 commit 8c3c0be

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

‎src/Views/Preferences.axaml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,15 @@
284284
CornerRadius="3"
285285
Text="{Binding ThemeOverrides, Mode=TwoWay}">
286286
<TextBox.InnerRightContent>
287-
<Button Classes="icon_button" Width="30" Height="30" Click="SelectThemeOverrideFile">
288-
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
289-
</Button>
287+
<StackPanel Orientation="Horizontal">
288+
<Button Classes="icon_button" Width="28" Height="28" Click="SelectThemeOverrideFile">
289+
<Path Width="16" Height="16" Data="{StaticResource Icons.Folder.Open}" Margin="0,2,0,0" Fill="{DynamicResource Brush.FG1}"/>
290+
</Button>
291+
292+
<Button Classes="icon_button" Width="28" Height="28" Click="OpenThemeRepository">
293+
<Path Width="14" Height="14" Data="{StaticResource Icons.Remotes}" Fill="{DynamicResource Brush.FG1}"/>
294+
</Button>
295+
</StackPanel>
290296
</TextBox.InnerRightContent>
291297
</TextBox>
292298

‎src/Views/Preferences.axaml.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ private async void SelectThemeOverrideFile(object _, RoutedEventArgs e)
232232
e.Handled = true;
233233
}
234234

235+
private void OpenThemeRepository(object _, RoutedEventArgs e)
236+
{
237+
Native.OS.OpenBrowser($"https://github.com/sourcegit-scm/sourcegit-theme");
238+
e.Handled = true;
239+
}
240+
235241
private async void SelectGitExecutable(object _, RoutedEventArgs e)
236242
{
237243
var pattern = OperatingSystem.IsWindows() ? "git.exe" : "git";

0 commit comments

Comments
 (0)