Clean up some watermark styling, start work on CompilerView

This commit is contained in:
trawzified 2024-02-04 12:07:20 +01:00
parent 3a88748e35
commit 9537306046
4 changed files with 49 additions and 68 deletions

View File

@ -726,6 +726,9 @@
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="{StaticResource TextBoxBackground}" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}" />
<Setter Property="FontSize" Value="14"/>
<Setter Property="Height" Value="36" />
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="3" />
<Setter Property="AllowDrop" Value="true" />
@ -837,6 +840,20 @@
</Style>
<Style BasedOn="{StaticResource MainTextBoxStyle}" TargetType="TextBox" />
<!-- TextBlock -->
<!--
<Style x:Key="WatermarkTextblock" TargetType="TextBlock">
<Setter Property="Visibility" Value="Collapsed" />
<Setter Property="IsHitTestVisible" Value="False" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="14"/>
<Setter Property="Foreground" Value="{StaticResource TextBoxDisabledForeground}"/>
<Setter Property="Margin" Value="5, 0, 0, 0"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Text, RelativeSource=Prev}}"
</Style.Triggers>
</Style>
-->
<!-- ComboBox -->
<Style x:Key="ComboBoxFocusVisual">
<Setter Property="Control.Template">
@ -975,6 +992,7 @@
<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}" />
<Setter Property="Padding" Value="5,3,5,1" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="FontSize" Value="14" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />

View File

@ -29,60 +29,23 @@
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="5" />
</Grid.ColumnDefinitions>
<local:HeatedBackgroundView Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="HeatedBackground" />
<Border Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"
x:Name="ModlistDetailsBackground"
Margin="1,1,5,0"
Background="{StaticResource WindowBackgroundBrush}"
BorderThickness="0,0,1,1">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="1,0" EndPoint="0,0">
<GradientStop Offset="0.5" Color="{StaticResource DarkBackgroundColor}" />
<GradientStop Offset="1" Color="{StaticResource WindowBackgroundColor}" />
</LinearGradientBrush>
</Border.BorderBrush>
</Border>
<Border Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"
x:Name="ModlistDetailsHeatBorder"
Margin="1,1,5,0"
BorderBrush="{StaticResource HeatedBorderBrush}"
BorderThickness="1" />
<Border Grid.Row="1" Grid.Column="3"
BorderBrush="{StaticResource BorderInterestBrush}"
BorderThickness="1,0,1,1">
<local:DetailImageView x:Name="DetailImage" BorderThickness="0" />
</Border>
<local:DetailImageView Grid.Row="1" Grid.Column="3" x:Name="DetailImage" BorderThickness="0" />
<!-- Comes after image area so shadow can overlay -->
<!--
<local:TopProgressView Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="TopProgressBar"
OverhangShadow="True" />
<Button Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="BackButton"
Width="30"
Height="30"
Margin="12,5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Style="{StaticResource IconCircleButtonStyle}"
ToolTip="Back to main menu">
<icon:PackIconMaterial Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Kind="ArrowLeft" />
</Button>
OverhangShadow="False" />
-->
<ScrollViewer Grid.Row="1" Grid.Column="1"
x:Name="SettingsScrollViewer"
Margin="5"
Background="Transparent"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
<StackPanel
Margin="0,5,0,0"
Background="Transparent"
Orientation="Vertical">
<StackPanel.Resources>
<Thickness
x:Key="TitleMargin"
Bottom="1"
Left="5" />
<Thickness x:Key="TitleMargin" Bottom="4" />
<Style
x:Key="ValueStyle"
BasedOn="{StaticResource MainTextBoxStyle}"
@ -99,18 +62,31 @@
<Setter Property="Margin" Value="0,0,0,6" />
</Style>
</StackPanel.Resources>
<TextBlock Margin="{StaticResource TitleMargin}" Text="ModList Name" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Author" />
<Grid>
<TextBox
x:Name="AuthorNameSetting"
Style="{StaticResource ValueStyle}" />
<TextBlock IsHitTestVisible="False" Text="Author name..." VerticalAlignment="Center" Foreground="{StaticResource TextBoxDisabledForeground}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding Text, ElementName=AuthorNameSetting}" Value="">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Grid>
<TextBlock Margin="{StaticResource TitleMargin}" Text="Title" />
<TextBox x:Name="ModListNameSetting" Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Version" />
<TextBox x:Name="VersionSetting" MaxLength="9" Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Selected Profile (if using MO2)" />
<TextBox x:Name="SelectedProfile" Style="{StaticResource ValueStyle}" />
<Button Margin="5" x:Name="ReInferSettings"> Re-infer Settings </Button>
<TextBlock Margin="{StaticResource TitleMargin}" Text="Version" />
<TextBox
x:Name="VersionSetting"
MaxLength="9"
Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Author" />
<TextBox x:Name="AuthorNameSetting" Style="{StaticResource ValueStyle}" />
<TextBlock Margin="{StaticResource TitleMargin}" Text="Description" />
<TextBox
x:Name="DescriptionSetting"

View File

@ -74,9 +74,11 @@ namespace Wabbajack
.BindToStrict(this, view => view.BeginButton.Command)
.DisposeWith(disposables);
/*
ViewModel.WhenAnyValue(vm => vm.BackCommand)
.BindToStrict(this, view => view.BackButton.Command)
.DisposeWith(disposables);
*/
ViewModel.WhenAnyValue(vm => vm.ReInferSettingsCommand)
.BindToStrict(this, view => view.ReInferSettings.Command)
@ -178,6 +180,7 @@ namespace Wabbajack
.DisposeWith(disposables);
/*
ViewModel.WhenAnyValue(vm => vm.StatusText)
.BindToStrict(this, view => view.TopProgressBar.Title)
.DisposeWith(disposables);
@ -186,6 +189,7 @@ namespace Wabbajack
.Select(d => d.Value)
.BindToStrict(this, view => view.TopProgressBar.ProgressPercent)
.DisposeWith(disposables);
*/
ViewModel.WhenAnyValue(vm => vm.AlwaysEnabled)
.WhereNotNull()

View File

@ -93,22 +93,7 @@
<Grid Grid.Row="0">
<TextBox
x:Name="SearchBox"
FontSize="14"
Height="36"
VerticalContentAlignment="Center"
ToolTip="Search for a game" />
<TextBlock FontSize="14" IsHitTestVisible="False" Text="Search for a modlist..." VerticalAlignment="Center" Margin="5, 0, 0, 0" Foreground="{StaticResource TextBoxDisabledForeground}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding Text, ElementName=SearchBox}" Value="">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
mahapps:TextBoxHelper.Watermark="Search for a modlist..." />
<Border BorderThickness="0" Width="30" Background="{StaticResource DarkPrimaryBrush}" HorizontalAlignment="Right">
<ic:SymbolIcon Symbol="Search" HorizontalAlignment="Center" IsFilled="True"/>
</Border>
@ -117,8 +102,6 @@
Grid.Row="1"
Margin="0, 10, 0, 0"
VerticalAlignment="Center"
FontSize="14"
Foreground="{StaticResource ForegroundBrush}"
ItemsSource="{Binding GameTypeEntries, Mode=TwoWay}"
SelectedItem="{Binding SelectedGameTypeEntry, Mode=TwoWay}"
IsSynchronizedWithCurrentItem="True"