Changeset 1211


Ignore:
Timestamp:
04/03/23 00:32:54 (20 months ago)
Author:
sz
Message:

linux compatibility (can't use the window state "zoomed", some state changes need wait_visibility())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/gui/utils.py

    r1202 r1211  
    11from threading import Timer
     2import os
    23
    34class Swap:
     
    5556# https://stackoverflow.com/questions/18394597/is-there-a-way-to-create-transparent-windows-with-tkinter
    5657def windowHideAndMaximize(wnd): # to get the size of working area on screen (screen minus taskbars, toolbars etc.) - make invisible maximized window
     58    if os.name=='posix':
     59        wnd.wait_visibility()
    5760    wnd.attributes("-alpha", 0)
    58     wnd.state('zoomed')
     61    if os.name=='posix':
     62        wnd.attributes("-zoomed", 1)
     63    else:
     64        wnd.state('zoomed')
    5965    wnd.update()
    6066
    6167def windowShowAndSetGeometry(wnd, geometry):
    62     wnd.state('normal')
     68    if os.name=='posix':
     69        wnd.attributes("-zoomed", 0)
     70        wnd.wait_visibility()
     71    else:
     72        wnd.state('normal')
    6373    wnd.update()
    6474    wnd.geometry(geometry)
Note: See TracChangeset for help on using the changeset viewer.