Skip to content

Commit

Permalink
- Fix for help screen being too tall, set max height to 500 and scrol…
Browse files Browse the repository at this point in the history
…lable
  • Loading branch information
wierzba3 committed Feb 25, 2016
1 parent 70b290f commit 00e0b09
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 146 deletions.
57 changes: 44 additions & 13 deletions Client/Controls/Help.xaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
<Window x:Class="Client.Help"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Help" SizeToContent="WidthAndHeight" WindowStartupLocation="CenterScreen" KeyDown="Help_OnKeyDown">
<ScrollViewer>
Title="Help"
Width="400"
Height="500"
KeyDown="Help_OnKeyDown"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen">
<ScrollViewer MaxHeight="500">
<Grid Margin="12">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Name="tbTitle" Text="Title" LineHeight="35" LineStackingStrategy="BlockLineHeight" FontSize="20" HorizontalAlignment="Left" />
<TextBlock Grid.Row="0" Grid.Column="1" Name="tbVersion" Text="Version" LineHeight="35" LineStackingStrategy="BlockLineHeight" HorizontalAlignment="Right" />
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
<TextBlock Height="auto" HorizontalAlignment="Left" Margin="0,12,0,0" Name="tbHelpText" Text="Help Text" VerticalAlignment="Top" />
<TextBlock HorizontalAlignment="Left" Margin="0,12,0,0" Name="textBlock1" Text="More info available at " Height="23" VerticalAlignment="Top">
<Hyperlink Name="hLink" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Name="tbLink" Text="benrhughes.com/todotxt.net" /></Hyperlink>
</TextBlock>
<TextBlock Name="tbTitle"
Grid.Row="0"
Grid.Column="0"
HorizontalAlignment="Left"
FontSize="20"
LineHeight="35"
LineStackingStrategy="BlockLineHeight"
Text="Title" />
<TextBlock Name="tbVersion"
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Right"
LineHeight="35"
LineStackingStrategy="BlockLineHeight"
Text="Version" />
<StackPanel Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2">
<TextBlock Name="tbHelpText"
Margin="0,12,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Text="Help Text" />
<TextBlock Name="textBlock1"
Height="23"
Margin="0,12,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Text="More info available at ">
<Hyperlink Name="hLink" RequestNavigate="Hyperlink_RequestNavigate">
<TextBlock Name="tbLink" Text="benrhughes.com/todotxt.net" />
</Hyperlink>
</TextBlock>
</StackPanel>
</Grid>
</ScrollViewer>
Expand Down
1 change: 1 addition & 0 deletions Client/Controls/Help.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public Help(string title, string version, string helpText, string helpUrl, strin
tbHelpText.Text = helpText;
hLink.NavigateUri = new Uri(helpUrl);
tbLink.Text = helpUrlText;
Application.Current.MainWindow.MaxHeight = 500;
}

private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
Expand Down
4 changes: 2 additions & 2 deletions Client/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,9 @@ public void AddNewTask()
{
if (filter.Contains("due:active"))
filters = filters + " " + "due:today"; // If the current filter is "active", replace it here with "today"
else if (filter.Equals("DONE", StringComparison.Ordinal)
else if (filter.Equals("DONE", StringComparison.Ordinal)
|| filter.Equals("-DONE", StringComparison.Ordinal))
continue
continue;
else
filters = filters + " " + filter;
}
Expand Down
260 changes: 129 additions & 131 deletions Client/Resource.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Client/Resource.resx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
width: 60px;
}</value>
</data>

<data name="HelpText" xml:space="preserve">
<value>Keyboard shortcuts:
- O or Ctrl+O: open todo.txt file
Expand Down

0 comments on commit 00e0b09

Please sign in to comment.