mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	[3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) (#119289)
gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175)
------
(cherry picked from commit 538ed5e481)
Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
			
			
This commit is contained in:
		
							parent
							
								
									24b0e8ddb4
								
							
						
					
					
						commit
						f7303cd967
					
				
					 5 changed files with 26 additions and 11 deletions
				
			
		|  | @ -11,15 +11,9 @@ | |||
|           "Your Python may not be configured for Tk. **", file=sys.__stderr__) | ||||
|     raise SystemExit(1) | ||||
| 
 | ||||
| # Valid arguments for the ...Awareness call below are defined in the following. | ||||
| # https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx | ||||
| if sys.platform == 'win32': | ||||
|     try: | ||||
|         import ctypes | ||||
|         PROCESS_SYSTEM_DPI_AWARE = 1  # Int required. | ||||
|         ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE) | ||||
|     except (ImportError, AttributeError, OSError): | ||||
|         pass | ||||
|     from idlelib.util import fix_win_hidpi | ||||
|     fix_win_hidpi() | ||||
| 
 | ||||
| from tkinter import messagebox | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)