Skip to content

Commit

Permalink
Fix progress bar layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Jan 18, 2021
1 parent e5d7d06 commit 38c5074
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 47 deletions.
87 changes: 43 additions & 44 deletions GalaxyBudsClient/Interface/Pages/SystemCoredumpPage.xaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<pages:AbstractPage xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pages="clr-namespace:GalaxyBudsClient.Interface.Pages"
xmlns:elements="clr-namespace:GalaxyBudsClient.Interface.Elements"
xmlns:items="clr-namespace:GalaxyBudsClient.Interface.Items"
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="36"
x:Class="GalaxyBudsClient.Interface.Pages.SystemCoredumpPage"
DockPanel.Dock="Top" Margin="10,0">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pages="clr-namespace:GalaxyBudsClient.Interface.Pages"
xmlns:elements="clr-namespace:GalaxyBudsClient.Interface.Elements"
xmlns:items="clr-namespace:GalaxyBudsClient.Interface.Items"
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="36"
x:Class="GalaxyBudsClient.Interface.Pages.SystemCoredumpPage"
DockPanel.Dock="Top" Margin="10,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="20"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="200"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20" />
<RowDefinition Height="Auto" />
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<elements:PageHeader Grid.Row="1" Title="{DynamicResource coredump_header}" BackButtonVisible="False"/>
<elements:PageHeader Grid.Row="1" Title="{DynamicResource coredump_header}" BackButtonVisible="False" />

<Border Grid.Row="3"
Classes="RoundedBorderListItem" >
Classes="RoundedBorderListItem">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand All @@ -29,52 +29,51 @@
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" x:Name="ProgressText"
FontSize="14"
Foreground="{DynamicResource ForegroundTextBrush}"
FontWeight="Bold"
Text="{DynamicResource coredump_dl_progress_prepare}"/>
Text="{DynamicResource coredump_dl_progress_prepare}" />
<TextBlock Grid.Column="2" x:Name="ProgressSizeText"
HorizontalAlignment="Right"
FontSize="12"
Foreground="{DynamicResource ForegroundTextBrush}"/>
Foreground="{DynamicResource ForegroundTextBrush}" />

</Grid>

<ProgressBar Grid.Row="1"
x:Name="Progress"
Margin="0,13"/>
Margin="0,13" />
<TextBlock Grid.Row="2"
FontSize="14"
Foreground="{DynamicResource ForegroundTextBrush}"
Text="{DynamicResource coredump_dl_note}"
TextWrapping="Wrap"/>
TextWrapping="Wrap" />
</Grid>
</Border>
<Border Grid.Row="5" Classes="RoundedBorderListItem" Height="50">
<Grid ClipToBounds="True" MinHeight="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Classes="BorderHoverStyle" PointerPressed="Cancel_OnPointerPressed"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Label FontSize="18"
Content="{DynamicResource cancel}"
VerticalContentAlignment="Center"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center"/>
</Border>
<Border Grid.Column="1" Classes="VerticalSeparator" />
<Border Grid.Column="2" Classes="BorderHoverStyle"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
</Border>
<Grid ClipToBounds="True" MinHeight="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Classes="BorderHoverStyle" PointerPressed="Cancel_OnPointerPressed"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Label FontSize="18"
Content="{DynamicResource cancel}"
VerticalContentAlignment="Center"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center" />
</Border>
<Border Grid.Column="1" Classes="VerticalSeparator" />
<Border Grid.Column="2"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</Grid>
</Border>
</Grid>
</pages:AbstractPage>
</pages:AbstractPage>
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void OnFinished(object? sender, LogDownloadFinishedEventArgs e)
};
string? path = await dlg.ShowAsync(MainWindow.Instance);

if (path == null)
if (string.IsNullOrEmpty(path))
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion GalaxyBudsClient/Interface/Pages/UpdateProgressPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<RowDefinition Height="20"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="200"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
Expand Down
2 changes: 1 addition & 1 deletion GalaxyBudsClient/i18n/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
<sys:String x:Key="coredump_dl_core_progress">Downloading core dump... {0}%</sys:String>
<sys:String x:Key="coredump_dl_progress_size">({0}/{1} bytes)</sys:String>
<sys:String x:Key="coredump_dl_note">
The audio stream is temporarily paused while downloading. Your earbuds will be disconnected as soon as the transmission finishes, please reconnect them manually.&#10;Once finished, you will be prompted to select a directory for all collected data.&#10;&#10;If the transmission is stuck or the device disconnected prematurely, you need to restart the download. This feature is currently unstable.
The audio stream is temporarily paused while downloading. Your earbuds will be disconnected as soon as the transmission finishes, please reconnect them manually.&#10;Once finished, you will be prompted to select a directory for all collected data.&#10;&#10;If the transmission is stuck or the device disconnected prematurely, you need to restart the download. This feature is currently very unstable.
</sys:String>
<sys:String x:Key="coredump_dl_save_fail_title">Failed to save dump</sys:String>
<sys:String x:Key="coredump_dl_save_fail">Unable to copy dump from temporary location. Reason: {0}</sys:String>
Expand Down

0 comments on commit 38c5074

Please sign in to comment.