Skip to content

Commit

Permalink
Fixed a small bug in the about tab, about tab can now be accessed eve…
Browse files Browse the repository at this point in the history
…n if the initial configuration hasn't been done
  • Loading branch information
BlackTasty committed Jun 21, 2018
1 parent 1f35341 commit f4c2a30
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions Osmo/Core/FixedValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ internal static void InitializeReader()
internal const int EDITOR_INDEX = 2;
internal const int MIXER_INDEX = 3;
internal const int CONFIG_INDEX = 5;
internal const int ABOUT_INDEX = 6;
internal const int TEMPLATE_EDITOR_INDEX = 7;

internal static SkinElementReader readerInterface;
Expand Down
8 changes: 6 additions & 2 deletions Osmo/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ private void UIElement_OnPreviewMouseLeftButtonUp(object sender, MouseButtonEven

private void sidebarMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (sidebarMenu.SelectedIndex != FixedValues.CONFIG_INDEX && !configuration.IsValid)
if (sidebarMenu.SelectedIndex != FixedValues.ABOUT_INDEX)
{
sidebarMenu.SelectedIndex = FixedValues.CONFIG_INDEX;
if (sidebarMenu.SelectedIndex != FixedValues.CONFIG_INDEX &&
!configuration.IsValid)
{
sidebarMenu.SelectedIndex = FixedValues.CONFIG_INDEX;
}
}

//until we had a StaysOpen glag to Drawer, this will help with scroll bars
Expand Down
4 changes: 2 additions & 2 deletions Osmo/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("0.0.1.50")]
[assembly: AssemblyFileVersion("0.0.1.50")]
4 changes: 2 additions & 2 deletions Osmo/UI/About.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
<material:PackIcon Kind="Application" Height="80" Width="80"/>
<TextBlock x:Name="txt_header" Text="Osmo " Style="{StaticResource MaterialDesignDisplay3TextBlock}"/>
<TextBlock x:Name="txt_header" Text="Osmo Alpha " Style="{StaticResource MaterialDesignDisplay3TextBlock}"/>
</StackPanel>

<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center">
<material:PackIcon Kind="GithubCircle" Height="22" Width="22"/>
<TextBlock Margin="8,0,0,0" Text="{DynamicResource about_openSource1}" VerticalAlignment="Center" Style="{StaticResource MaterialDesignSubheadingTextBlock}"/>
<TextBlock Text="Click here" TextDecorations="Underline" VerticalAlignment="Center" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Cursor="Hand" PreviewMouseDown="GitHubLink_PreviewMouseDown">
<TextBlock TextDecorations="Underline" VerticalAlignment="Center" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Cursor="Hand" PreviewMouseDown="GitHubLink_PreviewMouseDown">
<Run Text=" "/><Run Text="{DynamicResource about_openSource2}"/><Run Text=" "/>
</TextBlock>
<TextBlock Text="{DynamicResource about_openSource3}" VerticalAlignment="Center" Style="{StaticResource MaterialDesignSubheadingTextBlock}"/>
Expand Down
8 changes: 7 additions & 1 deletion Osmo/UI/About.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public partial class About : UserControl
{
private static About instance;

private bool versionAdded;

public static About Instance
{
get
Expand All @@ -46,7 +48,11 @@ private void GitHubLink_PreviewMouseDown(object sender, MouseButtonEventArgs e)

private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
txt_header.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString();
if (!versionAdded)
{
txt_header.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString();
versionAdded = true;
}
}
}
}

0 comments on commit f4c2a30

Please sign in to comment.