From a22eb2f2666c6f0a0ddef7b918222936c71c1ee5 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 19 Jun 2024 08:46:13 +0200 Subject: [3.13] gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634) (#120725) gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634) (cherry picked from commit 89f7208f672be635e923f04c19a7480eb8eb414c) Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com> Co-authored-by: Terry Jan Reedy --- Lib/turtledemo/__main__.py | 8 ++++---- .../next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py index 731f98b..df94ebc 100755 --- a/Lib/turtledemo/__main__.py +++ b/Lib/turtledemo/__main__.py @@ -218,7 +218,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) @@ -294,7 +294,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): @@ -304,7 +304,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, @@ -319,7 +319,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 index 0000000..9b39698 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-06-17-20-04-13.gh-issue-120633.kZC5wt.rst @@ -0,0 +1 @@ +Move scrollbar and remove tear-off menus in turtledemo. -- cgit v0.12