fix app list ui
This commit is contained in:
1 parent
0a5813b746
commit
a12f3be427
4 files changed
+112
-58
No files matched your search
@@ -15,23 +15,44 @@
|
||||
<!-- Row for the ListView -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button x:Uid="AppList_Import" VerticalAlignment="Top" Grid.Row="0" Margin="4,0,0,0" />
|
||||
<ListView ItemsSource="{x:Bind AppListData}" Grid.Row="1">
|
||||
<Button x:Uid="AppList_Import" VerticalAlignment="Top" Grid.Row="0" Margin="0,0,0,0" />
|
||||
<ListView ItemsSource="{x:Bind AppListData}" Grid.Row="1" VerticalAlignment="Top" SelectionMode="None">
|
||||
<ListView.Header>
|
||||
<Grid Padding = "0,16,0,12" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width = "120" />
|
||||
<ColumnDefinition Width = "120" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column = "0" Foreground = "{ThemeResource TextFillColorSecondaryBrush}" Text = "AppName" />
|
||||
<TextBlock Grid.Column = "1" Foreground = "{ThemeResource TextFillColorSecondaryBrush}" Text = "CreatedTime" />
|
||||
</Grid>
|
||||
|
||||
</ListView.Header>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:DataType="local:AppInfo">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<!-- A列 -->
|
||||
<ColumnDefinition Width="*" />
|
||||
<!-- B列 -->
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" Height="40" HorizontalContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="120" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{x:Bind Name}" Grid.Column="0" Margin="5" />
|
||||
<TextBlock Text="{x:Bind CreatedTime}" Grid.Column="1" Margin="5" />
|
||||
</Grid>
|
||||
<TextBlock Text="{x:Bind Name}" Grid.Column="0" HorizontalAlignment="Left" />
|
||||
<TextBlock Text="{x:Bind CreatedTime}" Grid.Column="1" HorizontalAlignment="Left"/>
|
||||
<Button Grid.Column="2" Content="run"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle >
|
||||
<Style BasedOn = "{StaticResource DefaultListViewItemStyle}" TargetType = "ListViewItem" >
|
||||
<Setter Property="Padding" Value="0,0,0,4" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<Page
|
||||
x:Class="GZStudio.Views.ConfigurationPage"
|
||||
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
@@ -14,7 +15,8 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="Windows 配置" Grid.Row="0" Margin="0,12,0,8" Style="{StaticResource SubtitleTextBlockStyle}"/>
|
||||
@@ -28,7 +30,21 @@
|
||||
</controls:SettingsCard>
|
||||
|
||||
<TextBlock Text="Python 配置" Grid.Row="3" Margin="0,12,0,8" Style="{StaticResource SubtitleTextBlockStyle}"/>
|
||||
<ComboBox IsEditable="True" Width="200" Grid.Row="4" Margin="0,0,0,8"/>
|
||||
|
||||
<controls:SettingsCard x:Name="settingsCard" Grid.Row="4"
|
||||
Description="自定义安装 Python 包的镜像仓库的地址"
|
||||
Header="镜像仓库"
|
||||
HeaderIcon="{ui:FontIcon Glyph=}"
|
||||
IsEnabled="{x:Bind IsCardEnabled, Mode=OneWay}">
|
||||
<ComboBox SelectedIndex="0">
|
||||
<x:String>https://pypi.org/simple</x:String>
|
||||
<x:String>https://mirrors.aliyun.com/pypi/simple</x:String>
|
||||
<x:String>https://pypi.tuna.tsinghua.edu.cn/simple</x:String>
|
||||
<x:String>https://pypi.mirrors.ustc.edu.cn</x:String>
|
||||
</ComboBox>
|
||||
</controls:SettingsCard>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -1,5 +1,7 @@
|
||||
<Page
|
||||
x:Class="GZStudio.Views.SettingsPage"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
@@ -14,54 +16,68 @@
|
||||
<StackPanel
|
||||
x:Name="ContentArea">
|
||||
<TextBlock x:Uid="Settings_Personalization" Style="{ThemeResource SubtitleTextBlockStyle}" />
|
||||
<StackPanel Margin="{StaticResource SmallTopBottomMargin}">
|
||||
<TextBlock x:Uid="Settings_Theme" />
|
||||
|
||||
<controls:SettingsCard Description="选择应用展示的主题"
|
||||
Header="应用主题"
|
||||
HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<ComboBox SelectedIndex="0">
|
||||
<ComboBoxItem>默认</ComboBoxItem>
|
||||
<ComboBoxItem>暗色</ComboBoxItem>
|
||||
<ComboBoxItem>亮色</ComboBoxItem>
|
||||
</ComboBox>
|
||||
</controls:SettingsCard>
|
||||
|
||||
<StackPanel Margin="{StaticResource XSmallTopMargin}">
|
||||
<RadioButton
|
||||
x:Uid="Settings_Theme_Light"
|
||||
Command="{x:Bind ViewModel.SwitchThemeCommand}"
|
||||
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Light, Mode=OneWay}"
|
||||
FontSize="15"
|
||||
GroupName="AppTheme">
|
||||
<RadioButton.CommandParameter>
|
||||
<xaml:ElementTheme>Light</xaml:ElementTheme>
|
||||
</RadioButton.CommandParameter>
|
||||
</RadioButton>
|
||||
<RadioButton
|
||||
x:Uid="Settings_Theme_Dark"
|
||||
Command="{x:Bind ViewModel.SwitchThemeCommand}"
|
||||
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Dark, Mode=OneWay}"
|
||||
FontSize="15"
|
||||
GroupName="AppTheme">
|
||||
<RadioButton.CommandParameter>
|
||||
<xaml:ElementTheme>Dark</xaml:ElementTheme>
|
||||
</RadioButton.CommandParameter>
|
||||
</RadioButton>
|
||||
<RadioButton
|
||||
x:Uid="Settings_Theme_Default"
|
||||
Command="{x:Bind ViewModel.SwitchThemeCommand}"
|
||||
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Default, Mode=OneWay}"
|
||||
FontSize="15"
|
||||
GroupName="AppTheme">
|
||||
<RadioButton.CommandParameter>
|
||||
<xaml:ElementTheme>Default</xaml:ElementTheme>
|
||||
</RadioButton.CommandParameter>
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock x:Uid="Settings_About" Style="{ThemeResource SubtitleTextBlockStyle}" />
|
||||
|
||||
<StackPanel Margin="{StaticResource XSmallTopMargin}">
|
||||
<TextBlock Text="{x:Bind ViewModel.VersionDescription, Mode=OneWay}" Style="{ThemeResource BodyTextBlockStyle}" />
|
||||
<TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" x:Uid="Settings_About" />
|
||||
|
||||
<controls:SettingsExpander Description="© 2024. All rights reserved." Header="GZStudio">
|
||||
<TextBlock IsTextSelectionEnabled="True" Text="Version 0.0.1" />
|
||||
<controls:SettingsExpander.Items>
|
||||
<controls:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left">
|
||||
<StackPanel Margin="-12,0,0,0" Orientation="Vertical">
|
||||
<TextBlock x:Uid="Settings_Theme" />
|
||||
|
||||
<StackPanel Margin="{StaticResource XSmallTopMargin}">
|
||||
<RadioButton
|
||||
x:Uid="Settings_Theme_Light"
|
||||
Command="{x:Bind ViewModel.SwitchThemeCommand}"
|
||||
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Light, Mode=OneWay}"
|
||||
FontSize="15"
|
||||
GroupName="AppTheme">
|
||||
<RadioButton.CommandParameter>
|
||||
<xaml:ElementTheme>Light</xaml:ElementTheme>
|
||||
</RadioButton.CommandParameter>
|
||||
</RadioButton>
|
||||
<RadioButton
|
||||
x:Uid="Settings_Theme_Dark"
|
||||
Command="{x:Bind ViewModel.SwitchThemeCommand}"
|
||||
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Dark, Mode=OneWay}"
|
||||
FontSize="15"
|
||||
GroupName="AppTheme">
|
||||
<RadioButton.CommandParameter>
|
||||
<xaml:ElementTheme>Dark</xaml:ElementTheme>
|
||||
</RadioButton.CommandParameter>
|
||||
</RadioButton>
|
||||
<RadioButton
|
||||
x:Uid="Settings_Theme_Default"
|
||||
Command="{x:Bind ViewModel.SwitchThemeCommand}"
|
||||
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Default, Mode=OneWay}"
|
||||
FontSize="15"
|
||||
GroupName="AppTheme">
|
||||
<RadioButton.CommandParameter>
|
||||
<xaml:ElementTheme>Default</xaml:ElementTheme>
|
||||
</RadioButton.CommandParameter>
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{x:Bind ViewModel.VersionDescription, Mode=OneWay}" Style="{ThemeResource BodyTextBlockStyle}" />
|
||||
<TextBlock x:Uid="Settings_AboutDescription" Margin="{StaticResource XSmallTopMargin}" Style="{ThemeResource BodyTextBlockStyle}" />
|
||||
<HyperlinkButton x:Uid="SettingsPage_PrivacyTermsLink" Margin="{StaticResource SettingsPageHyperlinkButtonMargin}" />
|
||||
</StackPanel>
|
||||
</controls:SettingsCard>
|
||||
</controls:SettingsExpander.Items>
|
||||
</controls:SettingsExpander>
|
||||
|
||||
<TextBlock
|
||||
x:Uid="Settings_AboutDescription"
|
||||
Margin="{StaticResource XSmallTopMargin}"
|
||||
Style="{ThemeResource BodyTextBlockStyle}" />
|
||||
<HyperlinkButton x:Uid="SettingsPage_PrivacyTermsLink" Margin="{StaticResource SettingsPageHyperlinkButtonMargin}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -65,6 +65,7 @@
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
</NavigationView.MenuItems>
|
||||
|
||||
<NavigationView.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
|
||||
Reference in new issue
Block a user