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

Change resolution check to use the primary monitor's working area. #168

Merged
merged 1 commit into from
May 28, 2024

Conversation

clienthax
Copy link
Contributor

Fixes oversized windows on multiple monitor setups when using dpi scaling.

Fixes oversized windows on multiple monitor setups when using dpi scaling.
@LeDragoX
Copy link
Owner

I don't have multiple monitors, so I'll only need you to use "Pascal Case" in the variables (PowerShell style convention) and you're good to go. Thanks for fixing this mess :p

Write-Verbose "Num. of Monitors: $NumberOfScreens"
# Get the primary screen's working area, which takes DPI scaling into account
$primaryScreen = [System.Windows.Forms.Screen]::PrimaryScreen
$bounds = $primaryScreen.Bounds

Check warning

Code scanning / PSScriptAnalyzer

The variable 'bounds' is assigned but never used. Warning

The variable 'bounds' is assigned but never used.
@LeDragoX
Copy link
Owner

As it's going to develop branch, I'll change it and merge to main, I did a mistake breaking another feature and need this PR to get inside too.

@LeDragoX LeDragoX merged commit 57c0341 into LeDragoX:develop May 28, 2024
2 checks passed
@LeDragoX LeDragoX mentioned this pull request May 28, 2024
LeDragoX added a commit that referenced this pull request May 28, 2024
* Removing all the properties changed to **Enable-WindowsSpotlight**
- Fix Remove-ItemPropertyVerified

* Add warning when path was not found using Remove-ItemPropertyVerified

* Fixed `Remove-ItemPropertyVerified` inaccurately reporting success
- The property is now removed correctly, accepting more paths

* Change resolution check to use the primary monitor's working area. (#168)

Fixes oversized windows on multiple monitor setups when using dpi scaling.

* Use Pascal Casing inside Get-CurrentResolution.psm1
- Remove unused variable $bounds

---------

Co-authored-by: Haxy <[email protected]>
@clienthax clienthax deleted the develop branch May 28, 2024 17:58
LeDragoX added a commit that referenced this pull request Sep 8, 2024
* Removing all the properties changed to **Enable-WindowsSpotlight**
- Fix Remove-ItemPropertyVerified

* Add warning when path was not found using Remove-ItemPropertyVerified

* Fixed `Remove-ItemPropertyVerified` inaccurately reporting success
- The property is now removed correctly, accepting more paths

* Change resolution check to use the primary monitor's working area. (#168)

Fixes oversized windows on multiple monitor setups when using dpi scaling.

* Use Pascal Casing inside Get-CurrentResolution.psm1
- Remove unused variable $bounds

* Fix ArchWSL cert install
- No manual steps required

* Fix GPG signing key when a key already exists for git config

* Stop logging before using the GPG/SSH setup

* Fix Java EclipseAdoptium JDK installation

* Remove Outlook app

* fix: revert Stand by time when plugged in to 30 minutes

* docs: Add section to import all modules in the terminal

* refactor: Remove unneeded Windows Optional Features (#180)
- NET Framework 3.5
- NET Framework 4.x + ASPNET 4.x

* docs: Prepare to use main branch only
- Set the Architecture as a requirement

---------

Co-authored-by: Haxy <[email protected]>
LeDragoX added a commit that referenced this pull request Sep 8, 2024
* Change resolution check to use the primary monitor's working area. (#168)

Fixes oversized windows on multiple monitor setups when using dpi scaling.

* Use Pascal Casing inside Get-CurrentResolution.psm1
- Remove unused variable $bounds

* Fix ArchWSL cert install
- No manual steps required

* Fix GPG signing key when a key already exists for git config

* Stop logging before using the GPG/SSH setup

* Fix Java EclipseAdoptium JDK installation

* Remove Outlook app

* fix: revert Stand by time when plugged in to 30 minutes

* docs: Add section to import all modules in the terminal

* refactor: Remove unneeded Windows Optional Features (#180)
- NET Framework 3.5
- NET Framework 4.x + ASPNET 4.x

* docs: Prepare to use main branch only
- Set the Architecture as a requirement

---------

Co-authored-by: Haxy <[email protected]>
LeDragoX added a commit that referenced this pull request Sep 8, 2024
* Removing all the properties changed to **Enable-WindowsSpotlight**
- Fix Remove-ItemPropertyVerified

* Add warning when path was not found using Remove-ItemPropertyVerified

* Fixed `Remove-ItemPropertyVerified` inaccurately reporting success
- The property is now removed correctly, accepting more paths

* Change resolution check to use the primary monitor's working area. (#168)

Fixes oversized windows on multiple monitor setups when using dpi scaling.

* Use Pascal Casing inside Get-CurrentResolution.psm1
- Remove unused variable $bounds

---------

Co-authored-by: Haxy <[email protected]>
LeDragoX added a commit that referenced this pull request Sep 8, 2024
* Change resolution check to use the primary monitor's working area. (#168)

Fixes oversized windows on multiple monitor setups when using dpi scaling.

* Use Pascal Casing inside Get-CurrentResolution.psm1
- Remove unused variable $bounds

* Fix ArchWSL cert install
- No manual steps required

* Fix GPG signing key when a key already exists for git config

* Stop logging before using the GPG/SSH setup

* Fix Java EclipseAdoptium JDK installation

* Remove Outlook app

* fix: revert Stand by time when plugged in to 30 minutes

* docs: Add section to import all modules in the terminal

* refactor: Remove unneeded Windows Optional Features (#180)
- NET Framework 3.5
- NET Framework 4.x + ASPNET 4.x

* docs: Prepare to use main branch only
- Set the Architecture as a requirement

---------

Co-authored-by: Haxy <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants