fire-eggs / Danbooru2021

Python scripts and tools for working with the Danbooru2022 data set. Note: this is a sqlite database and a viewer, not directly related to machine learning.
https://www.gwern.net/Danbooru2021
MIT License
42 stars 2 forks source link

Views need to be 'attached' #10

Closed fire-eggs closed 4 years ago

fire-eggs commented 4 years ago

Views are not currently 'attached': minimizing/restoring either view should minimize/restore both.

fire-eggs commented 4 years ago

Intercept <Configure> event:

root.bind( '<Configure>', onFormEvent )

And in def onFormEvent( event ):, event.type == 18 is 'minimize', and event.type == 19 is 'restore from minimize'. (see)

On 'minimize' in the main window, invoke window.withdraw() on other toplevel windows. On 'restore' in the main window, invoke window.update() and window.deiconify() on other toplevel windows.