mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # examples/simple_example.py
This commit is contained in:
commit
c3c7d1a5de
@ -77,7 +77,7 @@ class ScalingTracker:
|
||||
|
||||
DPI100pc = 96 # DPI 96 is 100% scaling
|
||||
DPI_type = 0 # MDT_EFFECTIVE_DPI = 0, MDT_ANGULAR_DPI = 1, MDT_RAW_DPI = 2
|
||||
window_hwnd = wintypes.HWND(window)
|
||||
window_hwnd = wintypes.HWND(window.winfo_id())
|
||||
monitor_handle = windll.user32.MonitorFromWindow(window_hwnd, wintypes.DWORD(2)) # MONITOR_DEFAULTTONEAREST = 2
|
||||
x_dpi, y_dpi = wintypes.UINT(), wintypes.UINT()
|
||||
windll.shcore.GetDpiForMonitor(monitor_handle, DPI_type, pointer(x_dpi), pointer(y_dpi))
|
||||
|
@ -12,11 +12,10 @@ class CTkCanvas(tkinter.Canvas):
|
||||
self.aa_circle_canvas_ids = set()
|
||||
|
||||
def get_char_from_radius(self, radius):
|
||||
if CTkSettings.scaling_factor == 1:
|
||||
if radius >= 20:
|
||||
return "A"
|
||||
else:
|
||||
return self.radius_to_char_fine[radius]
|
||||
if radius >= 20:
|
||||
return "A"
|
||||
else:
|
||||
return self.radius_to_char_fine[radius]
|
||||
|
||||
def create_aa_circle(self, x_pos, y_pos, radius, angle=0, fill="white", tags="", anchor=tkinter.CENTER) -> str:
|
||||
# create a circle with a font element
|
||||
|
Loading…
Reference in New Issue
Block a user