Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] MSS compatibility #6392

Closed
pas opened this issue May 27, 2023 · 2 comments
Closed

[Question] MSS compatibility #6392

pas opened this issue May 27, 2023 · 2 comments
Labels
Platform / Config Problem Specific to an OS or individual setup Port - TK PySimpleGUI question Further information is requested

Comments

@pas
Copy link

pas commented May 27, 2023

Type of Issue (Enhancement, Error, Bug, Question)

Question


Operating System

  • OS name: Windows
  • OS version: 11 Pro
  • OS architecture: x64

PySimpleGUI Port (tkinter, Qt, Wx, Web)

tkinter


Versions

Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()

Python version (sg.sys.version)

3.7.16

PySimpleGUI Version (sg.__version__)

4.60.4

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)

8.6.9


Your Experience In Months or Years (optional)

Years Python programming experience

Years Programming experience overall

Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)

Anything else you think would be helpful?


Troubleshooting

These items may solve your problem. Please check those you've done by changing - [ ] to - [X]

  • [x ] Searched main docs for your problem www.PySimpleGUI.org
  • [x ] Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org
  • [x ] None of your GUI code was generated by an AI algorithm like GPT
  • [x ] If not tkinter - looked for Demo Programs for specific port
  • [x ] For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • [x ] Run your program outside of your debugger (from a command line)
  • [x ] Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
  • [x ] Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
  • [x ] Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released

Detailed Description

MSS influences the size and the usability of GUI created by PySimpleGUI. The GUI gets unusable. Don't know if this is a issue of PySimpleGUI or MSS. Corresponding issue on mss-project: BoboTiG/python-mss#259 (comment)

Code To Duplicate

A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)

Short script to reproduce the issue. Press the button to see the issue:

import PySimpleGUI as sg

if __name__ == "__main__":
  window = sg.Window("bug", layout=[[sg.Button("Run mss")]])

  while True:
    event, values = window.read()
    if (event == "Run mss"):
      mss = mss()

Screenshot, Sketch, or Drawing

None, see example


Watcha Makin?

gameboy-tetris-tracker

@pysimpleissue pysimpleissue bot closed this as completed May 27, 2023
@pysimpleissue pysimpleissue bot added Fill issue form or you will be REJECTED You MUST use the supplied template to submit a request. PySimpleGUI Issues Bot Has Detected an Error and removed Fill issue form or you will be REJECTED You MUST use the supplied template to submit a request. PySimpleGUI Issues Bot Has Detected an Error labels May 27, 2023
@pysimpleissue pysimpleissue bot reopened this May 27, 2023
Repository owner deleted a comment from pysimpleissue bot May 27, 2023
@jason990420
Copy link
Collaborator

MSS will set DPI awareness to capture full screen on Hi-DPI monitors.

from mss import mss
import PySimpleGUI as sg

sg.set_options(dpi_awareness=True)    # Add this option to same as in MSS
window = sg.Window("bug", layout=[[sg.Button("Run mss")]])

while True:

    event, values = window.read()

    if event == sg.WIN_CLOSED:
        break

    elif (event == "Run mss"):
        mss_object = mss()

window.close

@jason990420 jason990420 added question Further information is requested Platform / Config Problem Specific to an OS or individual setup Port - TK PySimpleGUI labels May 27, 2023
@pas
Copy link
Author

pas commented May 27, 2023

Thanks!

@pas pas changed the title [ Bug] MSS compatibility [Question] MSS compatibility May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform / Config Problem Specific to an OS or individual setup Port - TK PySimpleGUI question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants