akshgpt7 / MarvellOS

A basic operating system GUI mock-up built using python's GUI module Tkinter.
20 stars 20 forks source link

Dynamic screen size and positioning #7

Open akshgpt7 opened 4 years ago

akshgpt7 commented 4 years ago

The current screen size and positioning (and sizing) of all widgets is static. Make them dynamic so as to adapt to various screen sizes and prevent overlapping.

koolgax99 commented 3 years ago

@akshgpt7 can you please assign this issue to me

akshgpt7 commented 3 years ago

Sure, go for it @koolgax99. Feel free to ask if you don't understand something.

koolgax99 commented 3 years ago

thankyou

koolgax99 commented 3 years ago

sir can you guide me as in how to change the size dynamically. I mean what size to use for which screen size

akshgpt7 commented 3 years ago

@koolgax99, Firstly, no need to use sir/mam in an open source community, everyone's equal :) Coming to your question, I think a good way to go about it would be to get the user's screen height and width using pyautogui, and using that, have a certain scaling factor to set: 1) The sizes of elements, 2) The positioning of elements. For example, using a scaling factor of 0.5 * screen_height for height of elements (or whatever looks right). Also, I've not really used tkinter grid for positioning, but I think that might make your work easier in some places, so do check it out!