Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f874c6e

Browse files
committed
修复一些ASF UI bug
1 parent b71fabb commit f874c6e

12 files changed

Lines changed: 51 additions & 104 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
$pexe=".\src\ST.Tools.Publish\bin\Release\net6.0\p.exe"
113113
& $pexe hp $dev
114114
& $pexe sta $dev
115-
& $pexe 7z -buildpackage $('"')$env:GITHUB_SHA_SHORT$('"') $dev
115+
& $pexe 7z -buildpackage ${env:GITHUB_SHA_SHORT} $dev
116116
117117
- name: Upload fd-win-x64 App ${{ matrix.configuration }}
118118
continue-on-error: true

src/Common.CoreLib/Extensions/CultureInfoExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,5 @@ public static string GetAcceptLanguage(this CultureInfo culture)
5050
}
5151

5252
// https://docs.microsoft.com/zh-cn/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c
53-
54-
public const int LCID_zh_CN = 0x0804;
55-
public const int LCID_en_US = 0x0409;
5653
}
5754
}

src/ST.Client.Desktop.Avalonia/Application/UI/Styles/Controls/TextBox.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<Style Selector="TextBox">
7373
<!--<Setter Property="FontFamily" Value="Microsoft YaHei UI,Microsoft YaHei,Simsun,苹方-简,宋体-简"></Setter>-->
7474
<!--<Setter Property="FontFamily" Value="{StaticResource UnicodeFont}" />-->
75-
<!--<Setter Property="ContextMenu" Value="{StaticResource DefaultTextBoxContextMenu}" />-->
75+
<Setter Property="ContextMenu" Value="{x:Null}" />
7676
<Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
7777

7878
<Setter Property="Template">

src/ST.Client.Desktop.Avalonia/Application/UI/Views/Controls/UserControl/PaperView.axaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/ST.Client.Desktop.Avalonia/Application/UI/Views/Controls/UserControl/PaperView.axaml.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/ArchiSteamFarmPlus/ASF_BotPage.axaml

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,20 @@
129129
<ItemsRepeater.ItemTemplate>
130130
<DataTemplate>
131131
<Border x:Name="card"
132-
Margin="10 0"
133132
Classes="paper"
134133
Background="{DynamicResource ThemeBrushKey}">
135134
<!--<Border.Background>
136135
<SolidColorBrush Color="{DynamicResource ThemeColorKey}"
137136
Opacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}"/>
138137
</Border.Background>-->
139-
<Grid Height="184"
138+
<Grid Height="150"
140139
ColumnDefinitions="Auto,*,Auto">
141140
<Border CornerRadius="{StaticResource PaperRadiusLeft}"
142141
ClipToBounds="True">
143142
<Panel x:Name="avatar" Cursor="Hand">
144143
<gif:Image2
145-
Width="184"
144+
Width="150"
145+
DecodeWidth="150"
146146
Stretch="Uniform"
147147
Source="{Binding AvatarUrl}"
148148
FallbackSource="avares://System.Application.SteamTools.Client.Avalonia/Application/UI/Assets/AppResources/avatar.jpg">
@@ -157,7 +157,6 @@
157157
<DockPanel.Styles>
158158
<Style Selector="TextBlock">
159159
<Setter Property="VerticalAlignment" Value="Center"/>
160-
<Setter Property="FontSize" Value="24"/>
161160
</Style>
162161
</DockPanel.Styles>
163162
<WrapPanel DockPanel.Dock="Left"
@@ -184,30 +183,24 @@
184183
</i:Interaction.Behaviors>
185184
</Ellipse>
186185
<controls:ScrollingTextBlock x:Name="nickname"
187-
Text="{Binding BotName}"
188-
FontSize="24"
186+
Classes="h4"
189187
Foreground="{DynamicResource HighlightForegroundBrushKey}"
190-
VerticalAlignment="Center"
191-
Cursor="Hand"
192-
ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_BtnTootlip,Mode=OneWay,Source={x:Static resx:R.Current}}">
193-
<!--<i:Interaction.Behaviors>
194-
<ia:EventTriggerBehavior EventName="Tapped" SourceObject="{ReflectionBinding #nickname}">
195-
<ia:InvokeCommandAction Command="{ReflectionBinding #u.DataContext.SteamId_Click}" CommandParameter="{Binding}"/>
196-
</ia:EventTriggerBehavior>
197-
</i:Interaction.Behaviors>-->
188+
VerticalAlignment="Center">
189+
<controls:ScrollingTextBlock.Text>
190+
<MultiBinding StringFormat="{}{0}({1})">
191+
<Binding Path="BotName"/>
192+
<Binding Path="Nickname"/>
193+
</MultiBinding>
194+
</controls:ScrollingTextBlock.Text>
198195
</controls:ScrollingTextBlock>
199-
<WrapPanel IsVisible="{Binding Nickname,Converter={StaticResource IsNullConverter},ConverterParameter=invert}">
200-
<TextBlock Text="("></TextBlock>
201-
<controls:ScrollingTextBlock Text="{Binding Nickname}"
202-
FontSize="24"/>
203-
<TextBlock Text=")"></TextBlock>
204-
</WrapPanel>
205-
<WrapPanel DockPanel.Dock="Right">
206-
<TextBlock Text="-"
207-
Margin="5 0"/>
208-
<TextBlock VerticalAlignment="Center"
209-
Text="{Binding Converter={StaticResource BotStatusConverter}}"/>
210-
</WrapPanel>
196+
<!--<controls:ScrollingTextBlock Text="{Binding Nickname,StringFormat=({0})}"
197+
Classes="h4"
198+
IsVisible="{Binding Nickname,Converter={StaticResource IsNullConverter},ConverterParameter=invert}"/>-->
199+
<TextBlock VerticalAlignment="Center"
200+
Classes="h5"
201+
Margin="5 0 0 0"
202+
Text="{Binding .,Converter={StaticResource BotStatusConverter}}
203+
StringFormat=-{0}"/>
211204
</WrapPanel>
212205

213206
<RelativePanel DockPanel.Dock="Right"
@@ -233,8 +226,8 @@
233226
VerticalAlignment="Center">
234227
<StackPanel.Styles>
235228
<Style Selector="PathIcon">
236-
<Setter Property="Width" Value="20"></Setter>
237-
<Setter Property="Height" Value="20"></Setter>
229+
<Setter Property="Width" Value="16"></Setter>
230+
<Setter Property="Height" Value="16"></Setter>
238231
</Style>
239232
<Style Selector="Button">
240233
<Setter Property="Background" Value="Transparent"></Setter>
@@ -373,7 +366,8 @@
373366
ClipToBounds="True">
374367
<Panel MaxWidth="184">
375368
<gif:Image2
376-
MaxHeight="86"
369+
MaxHeight="56"
370+
DecodeHeight="56"
377371
Stretch="Uniform"
378372
Source="{Binding ImageUrl}"
379373
FallbackSource="avares://System.Application.SteamTools.Client.Avalonia/Application/UI/Assets/AppResources/applogo.jpg">

src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/ArchiSteamFarmPlus/ASF_GlobalConfigPage.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
x:CompileBindings="True"
1919
x:Class="System.Application.UI.Views.Pages.ASF_GlobalConfigPage">
2020
<ScrollViewer>
21-
<StackPanel Classes="Settings">
21+
<StackPanel Classes="Settings" Margin="0">
2222
<Border Classes="Item">
2323
<WrapPanel VerticalAlignment="Center">
2424
<TextBlock Text="{ReflectionBinding Path=Res.ASF_VersionNum,Mode=OneWay,Source={x:Static resx:R.Current}}" VerticalAlignment="Center"></TextBlock>

src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/ArchiSteamFarmPlus/ArchiSteamFarmPlusPage.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
<Border Classes="paper"
103103
Margin="10 0 10 10"
104-
Padding="0 10"
104+
Padding="10"
105105
Background="{DynamicResource ThemeBrushKey}">
106106
<TabControl Classes="flat">
107107
<!--<TabItem Header="ASF 运行状态">

src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/LocalAuthPage.axaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@
121121
Width="250"
122122
Height="250"
123123
Background="{DynamicResource ThemeBrushKey}">
124-
<Border.ContextMenu>
125-
<ContextMenu>
124+
<Border.ContextFlyout>
125+
<MenuFlyout>
126126
<MenuItem
127127
Header="{ReflectionBinding Path=Res.LocalAuth_Copy,Mode=OneWay,Source={x:Static resx:R.Current}}"
128128
Command="{ReflectionBinding #u.DataContext.CopyCodeCilp}"
@@ -152,8 +152,8 @@
152152
</PathIcon>
153153
</MenuItem.Icon>
154154
</MenuItem>
155-
</ContextMenu>
156-
</Border.ContextMenu>
155+
</MenuFlyout>
156+
</Border.ContextFlyout>
157157
<i:Interaction.Behaviors>
158158
<ia:EventTriggerBehavior EventName="PointerEnter" SourceObject="{ReflectionBinding #panel}">
159159
<ia:ChangePropertyAction TargetObject="{ReflectionBinding #delete_btn}" PropertyName="IsVisible" Value="True"/>

src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/SteamAccountPage.axaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
<SolidColorBrush Color="{DynamicResource ThemeColorKey}"
9292
Opacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}"/>
9393
</Border.Background>-->
94-
<Border.ContextMenu>
95-
<ContextMenu>
94+
<Border.ContextFlyout>
95+
<MenuFlyout>
9696
<MenuItem
9797
Command="{ReflectionBinding #u.DataContext.SteamId_Click}"
9898
CommandParameter="{Binding}"
@@ -112,8 +112,8 @@
112112
Header="{ReflectionBinding Path=Res.UserChange_DeleteUser,
113113
Mode=OneWay,
114114
Source={x:Static resx:R.Current}}" />
115-
</ContextMenu>
116-
</Border.ContextMenu>
115+
</MenuFlyout>
116+
</Border.ContextFlyout>
117117
<i:Interaction.Behaviors>
118118
<ia:EventTriggerBehavior EventName="PointerEnter" SourceObject="{ReflectionBinding #card}">
119119
<ia:ChangePropertyAction

0 commit comments

Comments
 (0)