mirror of
https://github.com/batfasturd/BetterNPCEditor.git
synced 2025-09-13 15:19:24 +00:00
Fixed weird DPI issues
This commit is contained in:
parent
76e4491039
commit
8082b4cfc0
@ -6,6 +6,8 @@
|
|||||||
<RootNamespace>Better_NCP_Editor</RootNamespace>
|
<RootNamespace>Better_NCP_Editor</RootNamespace>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
<ForceDesignerDpiUnaware>true</ForceDesignerDpiUnaware>
|
||||||
|
<ApplicationHighDpiMode>DpiUnawareGdiScaled</ApplicationHighDpiMode>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ namespace Better_NCP_Editor
|
|||||||
{
|
{
|
||||||
// Set the minimum and default size.
|
// Set the minimum and default size.
|
||||||
this.MinimumSize = new Size(210, 120);
|
this.MinimumSize = new Size(210, 120);
|
||||||
|
//this.AutoScaleDimensions = new SizeF(96F, 96F); // or your base DPI
|
||||||
|
this.AutoScaleMode = AutoScaleMode.Dpi;
|
||||||
this.FormBorderStyle = FormBorderStyle.FixedDialog;
|
this.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ namespace Better_NCP_Editor
|
|||||||
public Form1()
|
public Form1()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.AutoScaleMode = AutoScaleMode.None;
|
||||||
dirTreeView.AfterSelect += DirTreeView_AfterSelect;
|
dirTreeView.AfterSelect += DirTreeView_AfterSelect;
|
||||||
entityTreeView.NodeMouseDoubleClick += entityTreeView_NodeMouseDoubleClick;
|
entityTreeView.NodeMouseDoubleClick += entityTreeView_NodeMouseDoubleClick;
|
||||||
entityTreeView.AfterSelect += entityTreeView_AfterSelect;
|
entityTreeView.AfterSelect += entityTreeView_AfterSelect;
|
||||||
@ -66,6 +67,7 @@ namespace Better_NCP_Editor
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<String> LoadItemList(String filepath)
|
private List<String> LoadItemList(String filepath)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -11,6 +11,9 @@ namespace Better_NCP_Editor
|
|||||||
// To customize application configuration such as set high DPI settings or default font,
|
// To customize application configuration such as set high DPI settings or default font,
|
||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
|
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new Form1());
|
Application.Run(new Form1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user