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

[Bug]: The position of the KryptonForm Control Buttons are too low, when no desktop scaling preference is applied #487

Closed
PWagner1 opened this issue Nov 25, 2021 · 13 comments
Labels
bug Something isn't working completed This issue has been completed.

Comments

@PWagner1
Copy link
Contributor

See PR #474 for details

@PWagner1 PWagner1 added the bug Something isn't working label Nov 25, 2021
@Smurf-IV
Copy link
Member

Using yesterdays nightly with .net48 running on Windows 10 and did not see the problem.
@Wagnerp Can you copy the video to here please ?
And also test in win10 using your set-up ?

@PWagner1
Copy link
Contributor Author

Using yesterdays nightly with .net48 running on Windows 10 and did not see the problem. @Wagnerp Can you copy the video to here please ? And also test in win10 using your set-up ?

@Smurf-IV Sure, might be a Win11 issue with having thicker titlebars. Bumped into a similar but rare issue where the ribbon collapse/expand button 'crunches' into the close button.

@PWagner1
Copy link
Contributor Author

PWagner1 commented Nov 27, 2021

Windows 11 - build 22000.348:

Animation

Windows 10 21H2:

Animation 2

Note that buttons are slightly cut off at the bottom.

@Smurf-IV
Copy link
Member

@Wagnerp Can yuo run the following app on Windows 11 and report what it looks like please
In .net48 and then in .net6
image

@PWagner1
Copy link
Contributor Author

@Smurf-IV As of 22000.376 & latest alpha build

.NET 4.8

KFENET48

.NET 6

KFENET6

The titlebars appear to be a tad thin

@Smurf-IV
Copy link
Member

The titlebars appear to be a tad thin

And, the Icon between the "(ExtraText)" has disappeared!
From the above, it looks like the items are being drawn 2 pixels too low, and Icon is clipped out because it is too big.

@Wagnerp Is it the same for the other themes as well ?

@PWagner1
Copy link
Contributor Author

@Smurf-IV Yes, the icons were changed to 16 x 16, which are the true native size, as the original icons were 11 x 9.

@Smurf-IV
Copy link
Member

At least 2 pixels according to VM Windows 11 (i.e not HDPI!)
image

@Smurf-IV
Copy link
Member

With scaling set to be 125%, then the position of the icons is correct in win 11:
image

@Smurf-IV
Copy link
Member

It is a Windows scaling problem, and not related to Win 11:
image

@Smurf-IV Smurf-IV changed the title [Bug]: The position of the KryptonForm Control Buttons are too low [Bug]: The position of the KryptonForm Control Buttons are too low, when no desktop scaling preference is applied Dec 30, 2021
@Smurf-IV Smurf-IV self-assigned this Dec 30, 2021
@Smurf-IV Smurf-IV added the under investigation This bug/issue is currently under investigation. label Dec 30, 2021
@Smurf-IV
Copy link
Member

Without the code fix on Win 10 @ 200%
image

With "Part" of the code fix:
image

Things to do:

  • Scale the App icon
  • Fix usage of the ButtonSpec when using custom image
  • Fix usage when scaling @ 100%

@Smurf-IV
Copy link
Member

2 & 3 done:
image

@Smurf-IV
Copy link
Member

All Done..
Will go into a PR tomorrow:
image
image
image

Smurf-IV added a commit that referenced this issue Dec 31, 2021
…ages

- Add image caching for resized images
- Try to locate the `g.DpiX > 96` into a single area for reuse
- Make sure images in the Form bar are always attempted to be drawn
Fixes: #487
Smurf-IV added a commit to Krypton-Suite/Standard-Toolkit-Demos that referenced this issue Dec 31, 2021
@Smurf-IV Smurf-IV removed their assignment Dec 31, 2021
@Smurf-IV Smurf-IV added completed This issue has been completed. and removed under investigation This bug/issue is currently under investigation. labels Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed This issue has been completed.
Projects
None yet
Development

No branches or pull requests

2 participants