window_manager icon indicating copy to clipboard operation
window_manager copied to clipboard

[Windows] It seems that padding has been added in full screen mode

Open nihai18789797273 opened this issue 1 year ago • 1 comments

WindowOptions windowOptions = const WindowOptions(
  //这里的title设置的是底部菜单栏显示的名称
  title: '教学资源平台',
  //居中显示
  center: true,
  //设置背景颜色,可以消除闪黑,但是会导致原生窗口
  backgroundColor: Color(0XFFFAFAFA),
  // 是否启用跳过任务栏
  skipTaskbar: false,
  // 窗口标题栏样式
  titleBarStyle: TitleBarStyle.hidden,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
  // await windowManager.setIcon('images/mlp_icon.ico');
  // 如下代码只能在windows端运行,库只支持windows设置如下属性
  if (Platform.isWindows) {
    // 必须同时设置下方两个属性,否则在非win11系统上会出现单侧边框的问题
    //设置为无框架模式
    await windowManager.setAsFrameless();
    //设置为有阴影
    await windowManager.setHasShadow(true);
  }
  // 展示窗口
  await windowManager.show();
  // 自动获取焦点
  await windowManager.focus();
});

image

When I set the above parameters to maximize the window and then play the video, clicking on the maximize button of the video will cause the problem as shown in the figure

nihai18789797273 avatar Aug 15 '23 09:08 nihai18789797273

image

nihai18789797273 avatar Aug 15 '23 09:08 nihai18789797273