mac style

This commit is contained in:
rmbgame
2021-06-05 19:28:04 +08:00
parent 8b9dcbbeb5
commit 76a5f080ff
5 changed files with 26 additions and 12 deletions
@@ -23,7 +23,7 @@ namespace System.Application.UI.Views
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
sp.Margin = new Avalonia.Thickness(0, 0, 140, 0);
else
sp.Margin = new Avalonia.Thickness(0, 12, 15, 0);
sp.Margin = new Avalonia.Thickness(0, 12, 10, 0);
}
}
@@ -97,8 +97,8 @@
<Border DockPanel.Dock="Bottom" Grid.Column="1" Grid.Row="1" Classes="paper" Margin="0 0 10 10" Background="{DynamicResource ThemeBrushKey}">
<Panel Margin="20 0">
<StackPanel>
<DockPanel Margin="0 10">
<DockPanel>
<DockPanel Margin="0 10" DockPanel.Dock="Top">
<CheckBox MinWidth="20"
Content="{ReflectionBinding Path=Res.CommunityFix_AllCheck,Mode=OneWay,Source={x:Static resx:R.Current}}"
IsChecked="{Binding #items.SelectedItem.ThreeStateEnable,Mode=TwoWay}">
@@ -110,7 +110,7 @@
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
</DockPanel>
<ScrollViewer>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" DockPanel.Dock="Bottom">
<ItemsControl Items="{ReflectionBinding #items.SelectedItem.ObservableItems}">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -130,7 +130,7 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</StackPanel>
</DockPanel>
</Panel>
</Border>
</DockPanel>
@@ -97,9 +97,22 @@ namespace Avalonia.Controls
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
ExtendClientAreaChromeHints =
ExtendClientAreaChromeHints.PreferSystemChrome |
ExtendClientAreaChromeHints.OSXThickTitleBar;
if (DI.Platform == System.Platform.Windows)
{
ExtendClientAreaChromeHints =
ExtendClientAreaChromeHints.PreferSystemChrome;
}
else if (DI.Platform == System.Platform.Apple)
{
ExtendClientAreaChromeHints =
ExtendClientAreaChromeHints.OSXThickTitleBar;
}
else
{
ExtendClientAreaChromeHints =
ExtendClientAreaChromeHints.SystemChrome;
}
}
}
}
@@ -77,7 +77,8 @@ namespace System.Application.UI.ViewModels
AddTabItem<LocalAuthPageViewModel>();
//AddTabItem<SteamIdlePageViewModel>();
//AddTabItem<ArchiSteamFarmPlusPageViewModel>();
AddTabItem<GameRelatedPageViewModel>();
if (DI.Platform == Platform.Windows)
AddTabItem<GameRelatedPageViewModel>();
//AddTabItem<OtherPlatformPageViewModel>();
AddTabItem(() => SettingsPageViewModel.Instance);
@@ -197,7 +197,7 @@ namespace System.Application.UI.ViewModels
public bool IsConfirmationsEmpty
{
get => Confirmations.Any_Nullable();
get => _ConfirmationsSourceList.Items.Any_Nullable();
}
public string ConfirmationsConutMessage
@@ -212,7 +212,7 @@ namespace System.Application.UI.ViewModels
{
return AppResources.LocalAuth_AuthTrade_ListNullTip;
}
return AppResources.LocalAuth_AuthTrade_ListCountTip.Format(Confirmations.Count);
return AppResources.LocalAuth_AuthTrade_ListCountTip.Format(_ConfirmationsSourceList.Count);
}
}
@@ -504,7 +504,7 @@ namespace System.Application.UI.ViewModels
private async void OperationTrades(bool accept)
{
if (!Confirmations.Any_Nullable())
if (!_ConfirmationsSourceList.Items.Any_Nullable())
{
ToastService.Current.Notify(AppResources.LocalAuth_AuthTrade_Null);
return;