Skip to content

Commit

Permalink
Browser behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
EndlessMISAKA committed Jul 2, 2023
1 parent 610b1ce commit 8d4d0d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion AtelierMisaka/Global/GlobalCommand.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using AtelierMisaka.Commands;
using AtelierMisaka.Models;
using CefSharp;
using CefSharp.Wpf;
using System.Net;
using System.Threading.Tasks;
Expand All @@ -14,8 +15,11 @@ public class GlobalCommand
GlobalData.VM_MA.ShowLogin = true;
});

public static CommonCommand CloseBrowserCommand = new CommonCommand(() =>
public static CommonCommand CloseBrowserCommand = new CommonCommand(async () =>
{
var cwb = (ChromiumWebBrowser)GlobalData.VM_MA.PatreonCefBrowser;
cwb.Load("about:blank");
await Task.Delay(300);
GlobalData.VM_MA.ShowLogin = false;
});

Expand Down
2 changes: 1 addition & 1 deletion AtelierMisaka/Views/Pop_Setting.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
</TextBlock>
</StackPanel>
</Grid>
<Grid Visibility="{Binding ShowLogin, Converter={StaticResource btvc}}" Background="#10FFFFFF">
<Grid Visibility="{Binding ShowLogin, Converter={StaticResource btvc}}" Background="#20FFFFFF">
<ContentControl Content="{Binding PatreonCefBrowser}" Margin="3,0,3,3"/>
<Button HorizontalAlignment="Right" VerticalAlignment="Top" Width="27" Margin="10"
Height="27" ToolTip="{DynamicResource Text_ClosePost}" Cursor="Hand"
Expand Down

0 comments on commit 8d4d0d9

Please sign in to comment.