@@ -242,22 +241,20 @@
return quill.getText();
}
- function SetLightEditor()
- {
+ function SetLightEditor(){
DarkReader.disable();
}
- function SetDarkEditor()
- {
+ function SetDarkEditor(){
DarkReader.enable();
}
- // function ShowToolbar() {
- // document.getElementById('editor-container').style.display = 'block';
+ // function ShowToolbar() {
+ // document.getElementById('editor-container').style.display = 'block';
// quill.focus();
// }
- // function HideToolbar() {
+ // function HideToolbar() {
// document.getElementById('editor-container').style.display = 'none';
// }
diff --git a/Wino.Mail/JS/Quill/global.css b/Wino.Mail/JS/Quill/global.css
new file mode 100644
index 00000000..c20569f5
--- /dev/null
+++ b/Wino.Mail/JS/Quill/global.css
@@ -0,0 +1,4 @@
+* {
+ scrollbar-color: auto !important;
+ scrollbar-width: thin !important;
+}
diff --git a/Wino.Mail/JS/Quill/reader.html b/Wino.Mail/JS/Quill/reader.html
index 30adca81..f5e54fe9 100644
--- a/Wino.Mail/JS/Quill/reader.html
+++ b/Wino.Mail/JS/Quill/reader.html
@@ -1,32 +1,38 @@
-
-
-
+
+
+
-
+ function SetLightEditor() {
+ document.documentElement.setAttribute('data-theme', 'light');
+ DarkReader.disable();
+ }
-
+ function SetDarkEditor() {
+ document.documentElement.setAttribute('data-theme', 'dark');
+ DarkReader.enable();
+ }
+
-
-
-
+
+
+
+
+
diff --git a/Wino.Mail/Views/ComposePage.xaml.cs b/Wino.Mail/Views/ComposePage.xaml.cs
index 84cffd23..921cd096 100644
--- a/Wino.Mail/Views/ComposePage.xaml.cs
+++ b/Wino.Mail/Views/ComposePage.xaml.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Diagnostics;
using System.Linq;
using System.Reactive.Linq;
using System.Threading;
@@ -21,9 +20,9 @@ using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
-using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Entities;
using Wino.Core.Domain.Enums;
+using Wino.Core.Domain.Interfaces;
using Wino.Core.Messages.Mails;
using Wino.Core.Messages.Shell;
using Wino.Extensions;
@@ -57,6 +56,7 @@ namespace Wino.Views
InitializeComponent();
Environment.SetEnvironmentVariable("WEBVIEW2_DEFAULT_BACKGROUND_COLOR", "00FFFFFF");
+ Environment.SetEnvironmentVariable("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--enable-features=OverlayScrollbar,OverlayScrollbarWinStyle,OverlayScrollbarWinStyleAnimation");
}
private static async void OnIsComposerDarkModeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
@@ -261,11 +261,13 @@ namespace Wino.Views
if (IsComposerDarkMode)
{
- await InvokeScriptSafeAsync("DarkReader.enable();");
+ Chromium.CoreWebView2.Profile.PreferredColorScheme = CoreWebView2PreferredColorScheme.Dark;
+ await InvokeScriptSafeAsync("SetDarkEditor();");
}
else
{
- await InvokeScriptSafeAsync("DarkReader.disable();");
+ Chromium.CoreWebView2.Profile.PreferredColorScheme = CoreWebView2PreferredColorScheme.Light;
+ await InvokeScriptSafeAsync("SetLightEditor();");
}
}
diff --git a/Wino.Mail/Views/MailRenderingPage.xaml.cs b/Wino.Mail/Views/MailRenderingPage.xaml.cs
index 8d16e1d6..5b18de9c 100644
--- a/Wino.Mail/Views/MailRenderingPage.xaml.cs
+++ b/Wino.Mail/Views/MailRenderingPage.xaml.cs
@@ -42,7 +42,7 @@ namespace Wino.Views
InitializeComponent();
Environment.SetEnvironmentVariable("WEBVIEW2_DEFAULT_BACKGROUND_COLOR", "00FFFFFF");
-
+ Environment.SetEnvironmentVariable("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--enable-features=OverlayScrollbar,OverlayScrollbarWinStyle,OverlayScrollbarWinStyleAnimation");
NavigationCacheMode = NavigationCacheMode.Enabled;
}
@@ -233,15 +233,13 @@ namespace Wino.Views
{
Chromium.CoreWebView2.Profile.PreferredColorScheme = CoreWebView2PreferredColorScheme.Dark;
- await InvokeScriptSafeAsync("ChangePrefferedTheme('dark')");
- await InvokeScriptSafeAsync("DarkReader.enable();");
+ await InvokeScriptSafeAsync("SetDarkEditor();");
}
else
{
Chromium.CoreWebView2.Profile.PreferredColorScheme = CoreWebView2PreferredColorScheme.Light;
- await InvokeScriptSafeAsync("ChangePrefferedTheme('light')");
- await InvokeScriptSafeAsync("DarkReader.disable();");
+ await InvokeScriptSafeAsync("SetLightEditor();");
}
}
diff --git a/Wino.Mail/Views/Settings/SignatureManagementPage.xaml.cs b/Wino.Mail/Views/Settings/SignatureManagementPage.xaml.cs
index a310b8d5..41e84625 100644
--- a/Wino.Mail/Views/Settings/SignatureManagementPage.xaml.cs
+++ b/Wino.Mail/Views/Settings/SignatureManagementPage.xaml.cs
@@ -31,6 +31,7 @@ namespace Wino.Views.Settings
this.InitializeComponent();
// Environment.SetEnvironmentVariable("WEBVIEW2_DEFAULT_BACKGROUND_COLOR", "00FFFFFF");
+ Environment.SetEnvironmentVariable("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--enable-features=OverlayScrollbar,OverlayScrollbarWinStyle,OverlayScrollbarWinStyleAnimation");
}
protected override void OnNavigatedFrom(NavigationEventArgs e)
diff --git a/Wino.Mail/Wino.Mail.csproj b/Wino.Mail/Wino.Mail.csproj
index 0a174eba..9a3dd94c 100644
--- a/Wino.Mail/Wino.Mail.csproj
+++ b/Wino.Mail/Wino.Mail.csproj
@@ -755,6 +755,7 @@
+