]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-120633: Move scrollbar and remove tear-off menus in turtledemo (#120634)
authorWulian233 <71213467+Wulian233@users.noreply.github.com>
Wed, 19 Jun 2024 06:20:54 +0000 (14:20 +0800)
committerGitHub <noreply@github.com>
Wed, 19 Jun 2024 06:20:54 +0000 (02:20 -0400)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/turtledemo/__main__.py
Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst [new file with mode: 0644]

index 06a64081a896b574190d19ebf0c62ba69f36dbc4..9c15916fb6672e2e41cc1e239a33f235dcec3a29 100644 (file)
@@ -216,7 +216,7 @@ class DemoWindow(object):
 
         self.vbar = vbar = Scrollbar(text_frame, name='vbar')
         vbar['command'] = text.yview
-        vbar.pack(side=LEFT, fill=Y)
+        vbar.pack(side=RIGHT, fill=Y)
         self.hbar = hbar = Scrollbar(text_frame, name='hbar', orient=HORIZONTAL)
         hbar['command'] = text.xview
         hbar.pack(side=BOTTOM, fill=X)
@@ -292,7 +292,7 @@ class DemoWindow(object):
         self.output_lbl.config(text=txt, fg=color)
 
     def makeLoadDemoMenu(self, master):
-        menu = Menu(master)
+        menu = Menu(master, tearoff=1)  # TJR: leave this one.
 
         for entry in getExampleEntries():
             def load(entry=entry):
@@ -302,7 +302,7 @@ class DemoWindow(object):
         return menu
 
     def makeFontMenu(self, master):
-        menu = Menu(master)
+        menu = Menu(master, tearoff=0)
         menu.add_command(label="Decrease (C-'-')", command=self.decrease_size,
                          font=menufont)
         menu.add_command(label="Increase (C-'+')", command=self.increase_size,
@@ -317,7 +317,7 @@ class DemoWindow(object):
         return menu
 
     def makeHelpMenu(self, master):
-        menu = Menu(master)
+        menu = Menu(master, tearoff=0)
 
         for help_label, help_file in help_entries:
             def show(help_label=help_label, help_file=help_file):
diff --git a/Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst b/Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst
new file mode 100644 (file)
index 0000000..9b39698
--- /dev/null
@@ -0,0 +1 @@
+Move scrollbar and remove tear-off menus in turtledemo.