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

Overlay postition depends on launch window position #2

Closed
BudgieInWA opened this issue Dec 2, 2018 · 5 comments
Closed

Overlay postition depends on launch window position #2

BudgieInWA opened this issue Dec 2, 2018 · 5 comments

Comments

@BudgieInWA
Copy link
Contributor

When I switching from the Launch Window to the overlay, the window doesn't move and so the overlay is offset towards the bottom right (depending on the position of the original window). These screenshots demonstrate it.

Notice the position of the top left corner of the launch window:
artifacthelper launch window

Notice the the overlay is starting at that same location:
artifacthelper overlay

(Also of note, the overlay is in the screenshot, so it covers up the names of some cards which aren't recognised. The overlay in this position would actually cause the right_border to fail, but I hard coded that during theses tests.)

If I move the Launch Window, launch the Overlay, then close the Overlay, the Launch Window does return to its hard coded size/location.


It looks like this root.geometry() call is failing to set the position. No matter what numbers I put in place of (100, 0), the overlay origin is always the same as the top left of the launch window.

As a workaround I position the launch window at (100, 0) on line 280 and don't move it.

@Miojo
Copy link
Collaborator

Miojo commented Dec 2, 2018

Helo BudgieInWA , Thanks for the input.

The issue seems to be related to tkinter .

What resolution is your monitor?
Are you building the code locally or using the Installer? If building locally what is your python version?

@Miojo
Copy link
Collaborator

Miojo commented Dec 3, 2018

New version has a button to drag the overlay, it will help with this issue while we can't pinpoint the error.

@BudgieInWA
Copy link
Contributor Author

Are you building the code locally or using the Installer?

I am using installer v0.6 and editing pkgs/artifact_helper.py etc. in place.

My monitor is 1920 * 1080.

@eoakley
Copy link
Owner

eoakley commented Dec 3, 2018

Please give it another shot on the latest release.

If you still have problems, open a new issue with the following:

  • Description of your setup
  • Full screenshot (all monitors)
  • File screen_shot_debugg.png from the install dir

Thanks for the help

@eoakley eoakley closed this as completed Dec 3, 2018
@BudgieInWA
Copy link
Contributor Author

It is strange that root.geometry('+x+y') works for the dragging but not while the overlay is being constructed. In any case, I can run root.geometry('+100+0') when the scan button is clicked and it repositions the window correctly!

Maybe this particular bug can be worked around by adding if outOfPosition(root): root.geometry(...) to the scan button. Maybe the overlay should always be exactly root.geometry("{}x{}+{}+{}".format(screen_width, screen_height, 0, 0))` with the position of the banner and cards positioned relative to the card bounding box. If that was true, #10 could still be used to locate the cards on screen, but without moving the window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants