opt: fix win7 crash on latest device_info_plus

This commit is contained in:
Kingtous
2022-11-30 13:56:02 +08:00
parent 11611daaba
commit c6e658e256
5 changed files with 107 additions and 38 deletions

View File

@@ -177,8 +177,7 @@ void runMultiWindow(
MyTheme.currentThemeMode(),
);
// we do not hide titlebar on win7 because of the frame overflow.
if (Platform.isWindows &&
const [WindowsTarget.w7].contains(windowsBuildNumber.windowsVersion)) {
if (kUseCompatibleUiMode) {
WindowController.fromWindowId(windowId!).showTitleBar(true);
}
switch (appType) {
@@ -283,8 +282,7 @@ void runInstallPage() async {
WindowOptions getHiddenTitleBarWindowOptions({Size? size}) {
var defaultTitleBarStyle = TitleBarStyle.hidden;
// we do not hide titlebar on win7 because of the frame overflow.
if (Platform.isWindows &&
const [WindowsTarget.w7].contains(windowsBuildNumber.windowsVersion)) {
if (kUseCompatibleUiMode) {
defaultTitleBarStyle = TitleBarStyle.normal;
}
return WindowOptions(