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