File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,16 +125,17 @@ def tearDownClass(cls):
125125 def test_fix_scaling (self ):
126126 from tkinter import font
127127 root = self .root
128- self .addCleanup (root .tk_scaling , root .tk_scaling ())
128+ scaling = root .tk .call ('tk' , 'scaling' ) # No Misc.tk_scaling yet.
129+ self .addCleanup (root .tk .call , 'tk' , 'scaling' , scaling )
129130 # Both fonts go with the root; Font.delete_font is a flag.
130131 pixels = font .Font (root = root , name = 'TestPixelFont' , size = - 16 )
131132 points = font .Font (root = root , name = 'TestPointFont' , size = 12 )
132133
133- root .tk_scaling ( 1.0 )
134+ root .tk . call ( 'tk' , 'scaling' , 1.0 )
134135 util .fix_scaling (root ) # No scaling, no change.
135136 self .assertEqual (int (pixels ['size' ]), - 16 )
136137
137- root .tk_scaling ( 2.0 )
138+ root .tk . call ( 'tk' , 'scaling' , 2.0 )
138139 util .fix_scaling (root ) # A size in pixels becomes one in points.
139140 self .assertEqual (int (pixels ['size' ]), 12 ) # round(-0.75 * -16)
140141 self .assertEqual (int (points ['size' ]), 12 ) # Points are left alone.
You can’t perform that action at this time.
0 commit comments