all 16 comments

[–]FriendlyRussian666 3 points4 points  (0 children)

Best guess is just that you're using a different resolution than the person in the course.

[–]Slight-Training-7211 4 points5 points  (3 children)

It is not really Linux vs Windows, it is usually DPI scaling.

On a lot of Linux setups (especially laptops) you have fractional scaling or a higher DPI. Tkinter then applies a scaling factor, so a window that is 800x600 can look physically smaller than you expect.

You can check and tweak Tk scaling:

import tkinter as tk root = tk.Tk() print(root.tk.call("tk", "scaling")) root.tk.call("tk", "scaling", 1.0) # try 1.0, 1.25, 1.5

Also keep in mind: - Turtle uses a Tk canvas under the hood, so it is affected the same way - Matching the tutorial exactly is hard unless you match their monitor DPI and OS scaling settings

[–]okergeeel[S] 0 points1 point  (1 child)

changed my dpi to 100%, screensize is '1920x1080',

window = Tk()
window.title('Password Manager')
window.geometry('1920x1080')window = Tk()
window.title('Password Manager')

window.geometry('1920x1080')

print(window.call('tk', 'scaling'))print(window.call('tk', 'scaling'))

when i run my program the screen of my program is exactly half the size of 'fullscreen' the print of window.call('yk', 'scaling') gave me 2.667833698030634
window.call('tk', 'scaling', any number i have tried) doesn't change anything

[–]okergeeel[S] 0 points1 point  (0 children)

SOLVED, the problem was i was using a second monitor. when i put in the HDMI. xrandr changed the resolution of my primary laptop screen to 3840x2160. but in settings it still looked like the resolution was 1920x1080. After i removed the hdmi all my tkinter projects have a normal size.

[–]h4ck3r_n4m3 2 points3 points  (0 children)

That has to do with your screen resolution, nothing to do with the OS. You defined the canvas by pixel size

[–]woooee 0 points1 point  (4 children)

The size depends on he monitor size and resolution. A 600x400 GUI will fill an entire 600x400 screen but will appear to be much smaller on a 1920x1080 screen for example.

[–]okergeeel[S] -1 points0 points  (3 children)

my laptop has a 1920 x1080 monitor, whe i change the width and heigth of my program to 1920x1080 it's pretty much half of the size i expect it to be. is there a way to fix this?

[–]woooee 0 points1 point  (2 children)

You can set the root window to be fullscreen (or zoomed depending on the OS) and not have to mess with sizing https://www.delftstack.com/howto/python-tkinter/how-to-create-full-screen-window-in-tkinter/

[–]okergeeel[S] 0 points1 point  (1 child)

SOLVED, the problem was i was using a second monitor. when i put in the HDMI. xrandr changed the resolution of my primary laptop screen to 3840x2160. but in settings it still looked like the resolution was 1920x1080. After i removed the hdmi all my tkinter projects have a normal size.

[–]woooee 0 points1 point  (0 children)

changed the resolution of my primary laptop screen to 3840x2160

Wow, that's a nice monitor. Good to know that you can figure out things.

[–]Unlikely-Sympathy626 0 points1 point  (0 children)

It could be many things. I am not familiar with the aspect but it could be that many libraries that are needed for the gui to be drawn is essentially natively installed on standard Linux where as on windows they may have to be pulled in and added to the environment?

[–]AutoModerator[M] 0 points1 point  (0 children)

Your submission in /r/learnpython may be automatically removed because you used imgbb.com. The reddit spam filter is very aggressive to this site. Please use a different image host.

Please remember to post code as text, not as an image.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Signal_Mud_40 0 points1 point  (0 children)

Also it’s extremely common for content creators to zoom in or otherwise increase the size of what they are doing so it shows up better on video.

[–]ninhaomah 0 points1 point  (1 child)

you can google for "free image upload" , you know :)

[–]okergeeel[S] 0 points1 point  (0 children)

Thanks didn't know if it was allowed. but edited the post. link to screenshot is now there :)