mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
ux: make log window resizable (#1253)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
30d42b11e2
commit
226bc434f5
2 changed files with 16 additions and 9 deletions
|
@ -13,16 +13,11 @@ namespace SourceGit.ViewModels
|
|||
private set;
|
||||
} = string.Empty;
|
||||
|
||||
public DateTime Time
|
||||
public DateTime StartTime
|
||||
{
|
||||
get;
|
||||
} = DateTime.Now;
|
||||
|
||||
public string TimeStr
|
||||
{
|
||||
get => Time.ToString("T");
|
||||
}
|
||||
|
||||
public bool IsComplete
|
||||
{
|
||||
get;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
Title="{DynamicResource Text.ViewLogs}"
|
||||
Icon="/App.ico"
|
||||
Width="800" Height="500"
|
||||
CanResize="False"
|
||||
CanResize="True"
|
||||
WindowStartupLocation="CenterOwner">
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
<!-- TitleBar -->
|
||||
|
@ -38,7 +38,13 @@
|
|||
</Grid>
|
||||
|
||||
<!-- Body -->
|
||||
<Grid Grid.Row="1" ColumnDefinitions="300,4,*" Margin="8">
|
||||
<Grid Grid.Row="1" Margin="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" MaxWidth="500" MinWidth="250"/>
|
||||
<ColumnDefinition Width="4"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ListBox Grid.Column="0"
|
||||
Padding="4"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
|
@ -89,7 +95,7 @@
|
|||
Classes="primary"
|
||||
Margin="4,0"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
Text="{Binding TimeStr}"
|
||||
Text="{Binding StartTime, StringFormat='{}{0:T}'}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
@ -103,6 +109,12 @@
|
|||
Fill="{DynamicResource Brush.FG2}"
|
||||
IsVisible="{Binding Logs.Count, Converter={x:Static c:IntConverters.IsZero}}"/>
|
||||
|
||||
<GridSplitter Grid.Column="1"
|
||||
MinWidth="1"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"/>
|
||||
|
||||
<Border Grid.Column="2"
|
||||
BorderBrush="{DynamicResource Brush.Border2}"
|
||||
BorderThickness="1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue