Skip to content

Commit b0355f2

Browse files
1 parent 92e1004 commit b0355f2

5 files changed

Lines changed: 46 additions & 72 deletions

File tree

examples/designer.ps1

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
VisualStyle
12
if ((Get-Module -ListAvailable vds).count -gt 1){
23
$global:module = $(path $(Get-Module -ListAvailable vds)[0].path)
34
}
@@ -716,23 +717,13 @@ function ExportForm {
716717
if ($scaleCheck.Checked -eq $True)
717718
{
718719

719-
$scaleString+= 'info $null 2>$null
720-
$vscreen = [System.Windows.Forms.SystemInformation]::VirtualScreen.height
721-
if ((get-host).version.major -eq 5) {
722-
[xml]$xml = @"
723-
<Window
724-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
725-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
726-
</Window>
727-
"@
728-
$dum = (New-Object System.Xml.XmlNodeReader $xml)
729-
$win = [Windows.Markup.XamlReader]::Load($dum)
730-
}
731-
732-
$screen = [System.Windows.Forms.SystemInformation]::VirtualScreen.height
733-
734-
$global:ctscale = ($screen/$vscreen)
735-
720+
$scaleString+= 'DPIAware
721+
'
722+
}
723+
if ($visualCheck.Checked -eq $True)
724+
{
725+
726+
$scaleString+= 'VisualStyle
736727
'
737728
}
738729
$mFooterString = ''
@@ -968,7 +959,8 @@ $mAddButton.Add_Click({AddElement})
968959

969960
#$mForm.Controls.Add($mAddButton)
970961

971-
$scaleCheck = dialog add $mform CheckBox 35 445 200 20 "Fix Scaling for HDR"
962+
$scaleCheck = dialog add $mform CheckBox 35 445 100 20 "DPIAware"
963+
$visualCheck = dialog add $mform CheckBox 35 545 100 20 "VisualStyle"
972964

973965
$mFormLabel = dialog add $mform label 5 5 30 25 'Title:'
974966
$mFormLabel.TextAlign='MiddleRight'

examples/vds-ide-noscale.ps1

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,23 +1634,13 @@ function ExportForm {
16341634
if ($scaleCheck.Checked -eq $True)
16351635
{
16361636

1637-
$scaleString+= 'info $null 2>$null
1638-
$vscreen = [System.Windows.Forms.SystemInformation]::VirtualScreen.height
1639-
if ((get-host).version.major -eq 5) {
1640-
[xml]$xml = @"
1641-
<Window
1642-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1643-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
1644-
</Window>
1645-
"@
1646-
$dum = (New-Object System.Xml.XmlNodeReader $xml)
1647-
$win = [Windows.Markup.XamlReader]::Load($dum)
1648-
}
1649-
1650-
$screen = [System.Windows.Forms.SystemInformation]::VirtualScreen.height
1651-
1652-
$global:ctscale = ($screen/$vscreen)
1653-
1637+
$scaleString+= 'DPIAware
1638+
'
1639+
}
1640+
if ($visualCheck.Checked -eq $True)
1641+
{
1642+
1643+
$scaleString+= 'VisualStyle
16541644
'
16551645
}
16561646
$mFooterString = ''
@@ -1893,7 +1883,8 @@ $mAddButton.Add_Click({AddElement})
18931883

18941884
#$mForm.Controls.Add($mAddButton)
18951885

1896-
$scaleCheck = dialog add $mform CheckBox 35 445 200 20 "Fix Scaling for HDR"
1886+
$scaleCheck = dialog add $mform CheckBox 35 445 100 20 "DPIAware"
1887+
$visualCheck = dialog add $mform CheckBox 35 545 100 20 "VisualStyle"
18971888

18981889
$mFormLabel = dialog add $mform label 5 5 30 25 'Title:'
18991890
$mFormLabel.TextAlign='MiddleRight'

examples/vds-ide.ps1

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -597,27 +597,27 @@ function global:menuitemclick ($menu) {
597597
}
598598
}
599599
else {
600-
if ($(ask "Screen Scale must be 100%. Would you like to launch another session in a compatible mode?") -eq "Yes"){
601-
switch ((get-host).version.major){
602-
"7" {
603-
if ($(ext $FastTab.SelectedTab.Text)) {
604-
start-process -filepath pwsh.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\vds-ide-noscale.ps1$(chr 34) $(chr 34)$(path $FastTab.SelectedTab.Text)\$(name $FastTab.SelectedTab.Text).$(ext $FastTab.SelectedTab.Text)$(chr 34)"
605-
}
606-
else {
607-
start-process -filepath pwsh.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\vds-ide-noscale.ps1$(chr 34)"
608-
}
609-
}
610600

611-
default {
612-
if ($(ext $FastTab.SelectedTab.Text)) {
613-
start-process -filepath powershell.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\vds-ide-noscale.ps1$(chr 34) $(chr 34)$(path $FastTab.SelectedTab.Text)\$(name $FastTab.SelectedTab.Text).$(ext $FastTab.SelectedTab.Text)$(chr 34)"
614-
}
615-
else {
616-
start-process -filepath powershell.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\vds-ide-noscale.ps1$(chr 34)"
617-
}
601+
switch ((get-host).version.major){
602+
"7" {
603+
if ($(ext $FastTab.SelectedTab.Text)) {
604+
start-process -filepath pwsh.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\designer.ps1$(chr 34)"
605+
}
606+
else {
607+
start-process -filepath pwsh.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\designer.ps1$(chr 34)"
608+
}
609+
}
610+
611+
default {
612+
if ($(ext $FastTab.SelectedTab.Text)) {
613+
start-process -filepath powershell.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\designer.ps1$(chr 34)"
614+
}
615+
else {
616+
start-process -filepath powershell.exe -argumentlist '-ep bypass','-windowstyle hidden','-sta',"-file $(chr 34)$(curdir)\designer.ps1$(chr 34)"
618617
}
619618
}
620619
}
620+
621621
}
622622
}
623623
"$localecompile" {
@@ -1636,23 +1636,13 @@ function ExportForm {
16361636
if ($scaleCheck.Checked -eq $True)
16371637
{
16381638

1639-
$scaleString+= 'info $null 2>$null
1640-
$vscreen = [System.Windows.Forms.SystemInformation]::VirtualScreen.height
1641-
if ((get-host).version.major -eq 5) {
1642-
[xml]$xml = @"
1643-
<Window
1644-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1645-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
1646-
</Window>
1647-
"@
1648-
$dum = (New-Object System.Xml.XmlNodeReader $xml)
1649-
$win = [Windows.Markup.XamlReader]::Load($dum)
1650-
}
1651-
1652-
$screen = [System.Windows.Forms.SystemInformation]::VirtualScreen.height
1653-
1654-
$global:ctscale = ($screen/$vscreen)
1655-
1639+
$scaleString+= 'DPIAware
1640+
'
1641+
}
1642+
if ($visualCheck.Checked -eq $True)
1643+
{
1644+
1645+
$scaleString+= 'VisualStyle
16561646
'
16571647
}
16581648
$mFooterString = ''
@@ -1895,7 +1885,8 @@ $mAddButton.Add_Click({AddElement})
18951885

18961886
#$mForm.Controls.Add($mAddButton)
18971887

1898-
$scaleCheck = dialog add $mform CheckBox 35 445 200 20 "Fix Scaling for HDR"
1888+
$scaleCheck = dialog add $mform CheckBox 35 445 200 20 "DPIAware"
1889+
$visualCheck = dialog add $mform CheckBox 35 545 100 20 "VisualStyle"
18991890

19001891
$mFormLabel = dialog add $mform label 5 5 30 25 'Title:'
19011892
$mFormLabel.TextAlign='MiddleRight'

vds.psd1

0 Bytes
Binary file not shown.

vds.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4949,7 +4949,7 @@ function sysinfo($a) {
49494949
return $major.Trim()+'.'+$minor.Trim()+'.'+$build.Trim()+'.'+$revision.Trim()
49504950
}
49514951
dsver {
4952-
return '0.3.3.7'
4952+
return '0.3.3.8'
49534953
}
49544954
winboot {
49554955
$return = Get-CimInstance -ClassName win32_operatingsystem | fl lastbootuptime | Out-String

0 commit comments

Comments
 (0)