fix: macos, main window, dark theme, border (#10749)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2025-02-10 00:25:11 +08:00 committed by GitHub
parent 9614bf266a
commit 2a0e8c109b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,7 +133,8 @@ void runMainApp(bool startService) async {
runApp(App());
// Set window option.
WindowOptions windowOptions = getHiddenTitleBarWindowOptions();
WindowOptions windowOptions =
getHiddenTitleBarWindowOptions(isMainWindow: true);
windowManager.waitUntilReadyToShow(windowOptions, () async {
// Restore the location of the main window before window hide or show.
await restoreWindowPosition(WindowType.Main);
@ -354,7 +355,10 @@ void runInstallPage() async {
}
WindowOptions getHiddenTitleBarWindowOptions(
{Size? size, bool center = false, bool? alwaysOnTop}) {
{bool isMainWindow = false,
Size? size,
bool center = false,
bool? alwaysOnTop}) {
var defaultTitleBarStyle = TitleBarStyle.hidden;
// we do not hide titlebar on win7 because of the frame overflow.
if (kUseCompatibleUiMode) {
@ -363,7 +367,7 @@ WindowOptions getHiddenTitleBarWindowOptions(
return WindowOptions(
size: size,
center: center,
backgroundColor: Colors.transparent,
backgroundColor: (isMacOS && isMainWindow) ? null : Colors.transparent,
skipTaskbar: false,
titleBarStyle: defaultTitleBarStyle,
alwaysOnTop: alwaysOnTop,