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

CenterOnScreen not working for FixedSize Window #2550

Closed
scorpione71 opened this issue Oct 14, 2021 · 11 comments
Closed

CenterOnScreen not working for FixedSize Window #2550

scorpione71 opened this issue Oct 14, 2021 · 11 comments
Labels
OS:Linux Tickets affecting only Linux unverified A bug that has been reported but not verified

Comments

@scorpione71
Copy link

scorpione71 commented Oct 14, 2021

Describe the bug:

Good evening. I have some problems found after updating Fyne V. 2.0 to Version V. 2.1. The fields of the struct Label "Alignment fyne.TextAlign" and "TextStyle fyne.TextStyle", which worked perfectly with V. 2.0, do not work after the update to V. 2.1. Another problem, the "CenterOnScreen ()" function, which should place the window in the center of the screen, which worked before the update, with the new version, unfortunately it positions the window lower and to the right of the center of the screen. I hope that these problems that I have encountered can be solved, and in any case, I take advantage of the opportunity to compliment the excellent work done.

To Reproduce:

Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots:

Allign Style

CenterOnScreen

Example code:

Device (please complete the following information):

  • OS: Linux Mint
  • Version: 20.2]
  • Go version: 1.17.2]
  • Fyne version: 2.1]
@scorpione71 scorpione71 added the unverified A bug that has been reported but not verified label Oct 14, 2021
@Jacalz
Copy link
Member

Jacalz commented Oct 14, 2021

We prefer to have one bug report per issue because it is much more clear (especially if a PR is aiming to fix one issue but the issue remains open afterwards because the other bugs in the issue are not fixed). It would be great if we could get working, minimal code examples for reproducing issues (no screenshots of code please and not parts of code).

@andydotxyz
Copy link
Member

After editing properties of a widget you need to call Refresh. You can get this behaviour back by making the SetText the last call in your function as it will refresh and apply all the settings you have made.

@scorpione71
Copy link
Author

scorpione71 commented Oct 15, 2021 via email

@andydotxyz andydotxyz changed the title Problems with Fyne V. 2.1 CenterOnScreen not working for FixedSize Window Oct 16, 2021
@andydotxyz
Copy link
Member

I cannot replicate the center on screen issue, perhaps it is Linux (Mint?) specific.
Can you provide more details about the desktop / window manager so we can replicate?

@lucasepe
Copy link

Maybe the center on screen is not a real issue.
If it can help, I noticed that this also happens to me but only when I activate the second monitor.
Using just one display the window is correctly centered on the screen.

$ hostnamectl
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.10.0-9-amd64
      Architecture: x86-64
$ cat /usr/share/gnome/gnome-version.xml
<?xml version="1.0"?>
<gnome-version>
  <platform>3</platform>
  <minor>38</minor>
  <micro>5</micro>
  <distributor>Debian</distributor>
</gnome-version>

@andydotxyz
Copy link
Member

Using just one display the window is correctly centered on the screen.

When there is a second screen active where does the window appear?

@lucasepe
Copy link

It appears a little bit moved to the lower right corner (do you want me to run a snippet with a fixed size window and post the screen shots?)

@andydotxyz
Copy link
Member

That could be helpful thanks. There a couple of different ways the positioning could be off and seeing it will help.

@lucasepe
Copy link

I have to correct myself, doing more experiments I noticed that regardless of number of monitors the window is not centered when the w.Resize(...) command is given (calls order does not make difference).

I have attached an animated gif showing that using w.Resize(...) the window is no longer centered (btw: I'dont think it's a big issue...users move windows all the time).
center_on_screen

@andydotxyz andydotxyz added the OS:Linux Tickets affecting only Linux label Nov 17, 2021
@andydotxyz
Copy link
Member

Fixed in v2.1.2

@scorpione71
Copy link
Author

scorpione71 commented Dec 7, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS:Linux Tickets affecting only Linux unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

4 participants