@@ -74,7 +74,8 @@ def edge_build(key_type, key, description=''):
74
74
register_key = rf'Computer\{ key_type } \{ path } '
75
75
windows_key = winreg .OpenKey (getattr (winreg , key_type ), rf'SOFTWARE\{ path } ' )
76
76
build , _ = winreg .QueryValueEx (windows_key , 'pv' )
77
- build = int (build .replace ('.' , '' )[:6 ])
77
+ # build = int(build.replace('.', '')[:6])
78
+ build = int (build .split ('.' )[0 ])
78
79
79
80
return build
80
81
except Exception as e :
@@ -113,8 +114,8 @@ def edge_build(key_type, key, description=''):
113
114
for item in build_versions :
114
115
for key_type in ('HKEY_CURRENT_USER' , 'HKEY_LOCAL_MACHINE' ):
115
116
build = edge_build (key_type , item ['key' ], item ['description' ])
116
-
117
- if build >= 860622 : # Webview2 86.0.622.0
117
+ # if build >= 860622: # Webview2 86.0.622.0
118
+ if build >= 86 : # Webview2 86.x
118
119
return True
119
120
120
121
except Exception as e :
@@ -200,7 +201,8 @@ def __init__(self, window):
200
201
self .url = window .real_url
201
202
self .text_select = window .text_select
202
203
self .on_top = window .on_top
203
-
204
+ self .scale_factor = 1
205
+
204
206
self .is_fullscreen = False
205
207
if window .fullscreen :
206
208
self .toggle_fullscreen ()
@@ -396,7 +398,8 @@ def move(self, x, y):
396
398
SWP_NOSIZE = 0x0001 # Retains the current size
397
399
SWP_NOZORDER = 0x0004 # Retains the current Z order
398
400
SWP_SHOWWINDOW = 0x0040 # Displays the window
399
- if (self .scale_factor ):
401
+ if (self .scale_factor != 1 ):
402
+ # The coordinates needed to be scaled
400
403
x_modified = x * self .scale_factor
401
404
y_modified = y * self .scale_factor
402
405
windll .user32 .SetWindowPos (self .Handle .ToInt32 (), None , int (x_modified ), int (y_modified ), None , None , SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW )
0 commit comments