mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
fix: macos, main window, dark theme, border (#10749)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user