Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ed91eea

Browse files
committedOct 4, 2023
Changelog:
- Implement update.
1 parent 67f64de commit ed91eea

File tree

3 files changed

+48
-20
lines changed

3 files changed

+48
-20
lines changed
 

‎App.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public partial class App : Application
2929

3030
public readonly string CONFIG_FILE_PATH = "";
3131

32+
public readonly string OFFICIAL_GITHUB_REPO_LINK = "https://github.com/ArcaneDegree/Java-Bytecode-Toolkit";
33+
3234
public readonly Logger logger = null;
3335

3436
public readonly Configuration configuration = null;

‎MainWindow.xaml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,52 @@
1818
<ColumnDefinition Width="*"/>
1919
</Grid.ColumnDefinitions>
2020

21-
<ScrollViewer Grid.Row="0" Grid.Column="0" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto">
22-
<Menu Name="ToolbarMenu" FontWeight="SemiBold" Foreground="{DynamicResource ForegroundColor1}" Background="{DynamicResource BackgroundColor2}">
23-
<MenuItem Padding="10 6" Header="File">
24-
<MenuItem Name="OpenFileMenuItem" Header="Open a File...">
25-
<MenuItem.Icon>
26-
<Image Source="/Assets/file-icon.svg"/>
27-
</MenuItem.Icon>
28-
</MenuItem>
29-
</MenuItem>
21+
<ScrollViewer Grid.Row="0" Grid.Column="0" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto" Background="{DynamicResource BackgroundColor2}">
22+
<Grid>
23+
<Grid.RowDefinitions>
24+
<RowDefinition Height="*"/>
25+
</Grid.RowDefinitions>
26+
27+
<Grid.ColumnDefinitions>
28+
<ColumnDefinition Width="*"/>
3029

31-
<MenuItem Name="HomeMenuItem" Header="Home"/>
30+
<ColumnDefinition Width="auto"/>
31+
</Grid.ColumnDefinitions>
3232

33-
<MenuItem Name="SettingsMenuItem" Header="Settings"/>
33+
<Menu Name="ToolbarMenu" Grid.Row="0" Grid.Column="0" FontWeight="SemiBold" Foreground="{DynamicResource ForegroundColor1}">
34+
<MenuItem Padding="10 6" Header="File">
35+
<MenuItem Name="OpenFileMenuItem" Header="Open a File...">
36+
<MenuItem.Icon>
37+
<Image Source="/Assets/file-icon.svg"/>
38+
</MenuItem.Icon>
39+
</MenuItem>
40+
</MenuItem>
3441

35-
<MenuItem Header="Help"/>
42+
<MenuItem Name="HomeMenuItem" Header="Home"/>
3643

37-
<MenuItem Header="About"/>
44+
<MenuItem Name="SettingsMenuItem" Header="Settings"/>
3845

39-
<MenuItem Header="Report a Bug"/>
46+
<MenuItem Header="About"/>
4047

41-
<MenuItem Header="Request a Feature"/>
48+
<MenuItem Header="Help"/>
4249

43-
<MenuItem Header="Change Theme">
44-
<MenuItem Name="LightThemeMenuItem" Header="Light Theme" Icon="{DynamicResource LightThemeIcon}"/>
50+
<MenuItem Header="Change Theme">
51+
<MenuItem Name="LightThemeMenuItem" Header="Light Theme" Icon="{DynamicResource LightThemeIcon}"/>
52+
53+
<MenuItem Name="DarkThemeMenuItem" Header="Dark Theme" Icon="{DynamicResource DarkThemeIcon}"/>
54+
</MenuItem>
55+
</Menu>
4556

46-
<MenuItem Name="DarkThemeMenuItem" Header="Dark Theme" Icon="{DynamicResource DarkThemeIcon}"/>
47-
</MenuItem>
48-
</Menu>
57+
<DockPanel Grid.Row="0" Grid.Column="1" LastChildFill="False">
58+
<Button Name="GithubButton">
59+
<Path DockPanel.Dock="Left" Margin="4" Stretch="Uniform" Fill="{DynamicResource ForegroundColor2}" Width="24" Height="24" Data="M17.791,46.836C18.502,46.53,19,45.823,19,45v-5.4c0-0.197,0.016-0.402,0.041-0.61C19.027,38.994,19.014,38.997,19,39 c0,0-3,0-3.6,0c-1.5,0-2.8-0.6-3.4-1.8c-0.7-1.3-1-3.5-2.8-4.7C8.9,32.3,9.1,32,9.7,32c0.6,0.1,1.9,0.9,2.7,2c0.9,1.1,1.8,2,3.4,2 c2.487,0,3.82-0.125,4.622-0.555C21.356,34.056,22.649,33,24,33v-0.025c-5.668-0.182-9.289-2.066-10.975-4.975 c-3.665,0.042-6.856,0.405-8.677,0.707c-0.058-0.327-0.108-0.656-0.151-0.987c1.797-0.296,4.843-0.647,8.345-0.714 c-0.112-0.276-0.209-0.559-0.291-0.849c-3.511-0.178-6.541-0.039-8.187,0.097c-0.02-0.332-0.047-0.663-0.051-0.999 c1.649-0.135,4.597-0.27,8.018-0.111c-0.079-0.5-0.13-1.011-0.13-1.543c0-1.7,0.6-3.5,1.7-5c-0.5-1.7-1.2-5.3,0.2-6.6 c2.7,0,4.6,1.3,5.5,2.1C21,13.4,22.9,13,25,13s4,0.4,5.6,1.1c0.9-0.8,2.8-2.1,5.5-2.1c1.5,1.4,0.7,5,0.2,6.6c1.1,1.5,1.7,3.2,1.6,5 c0,0.484-0.045,0.951-0.11,1.409c3.499-0.172,6.527-0.034,8.204,0.102c-0.002,0.337-0.033,0.666-0.051,0.999 c-1.671-0.138-4.775-0.28-8.359-0.089c-0.089,0.336-0.197,0.663-0.325,0.98c3.546,0.046,6.665,0.389,8.548,0.689 c-0.043,0.332-0.093,0.661-0.151,0.987c-1.912-0.306-5.171-0.664-8.879-0.682C35.112,30.873,31.557,32.75,26,32.969V33 c2.6,0,5,3.9,5,6.6V45c0,0.823,0.498,1.53,1.209,1.836C41.37,43.804,48,35.164,48,25C48,12.318,37.683,2,25,2S2,12.318,2,25 C2,35.164,8.63,43.804,17.791,46.836z">
60+
<Path.ToolTip>
61+
Follow us on Github
62+
</Path.ToolTip>
63+
</Path>
64+
</Button>
65+
</DockPanel>
66+
</Grid>
4967
</ScrollViewer>
5068

5169
<ContentPresenter Name="MainContentPresenter" Grid.Row="1" Grid.Column="0">

‎MainWindow.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System;
44
using System.Collections.Generic;
55
using System.ComponentModel;
6+
using System.Diagnostics;
67
using System.Linq;
78
using System.Text;
89
using System.Threading.Tasks;
@@ -64,6 +65,11 @@ private void OnClosed(object sender, EventArgs e)
6465
App.Current.configuration.Save();
6566
}
6667

68+
private void OnGithubButtonClick(object sender, RoutedEventArgs e)
69+
{
70+
Process.Start(App.Current.OFFICIAL_GITHUB_REPO_LINK);
71+
}
72+
6773
public MainWindow()
6874
{
6975
InitializeComponent();
@@ -88,6 +94,8 @@ public MainWindow()
8894
this.SettingsMenuItem.Click += this.OnSettingsMenuItemClick;
8995

9096
this.Closed += this.OnClosed;
97+
98+
this.GithubButton.Click += this.OnGithubButtonClick;
9199
}
92100
}
93101
}

0 commit comments

Comments
 (0)
Please sign in to comment.