mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
High-DPI: main menu and toolbar icons are now scaled to match current DPI settings.
High-DPI: the width of status labels is now scaled to match current DPI settings. Updated documentation.
This commit is contained in:
parent
fd52810312
commit
c5a4c1987a
4 changed files with 34 additions and 3 deletions
|
@ -33,7 +33,7 @@
|
|||
<p><strong>Q: </strong>Dynamic lights defined in GLDEFS are not rendered in Visual mode / I'm getting a ton of "<strong>Light declaration not found for light '[light name]' ('[source]', line [n])</strong>" warnings. What's wrong?<br />
|
||||
<strong>A:</strong> GZDoom Builder doesn't include GZDoom's/Zandronum's GLDEFS light definitions.<br />
|
||||
<span class="style1">If you are using GZDoom:</span><br />
|
||||
To get rid of these errors, add "<strong>lights.pk3</strong>" as a map resource. Don't forget to check "<strong>Exclude from testing parameters</strong>" chekbox while adding it, otherwise GZDoom won't load your map. "<strong>lights.pk3</strong>" can be found in GZDoom folder.<br />
|
||||
To get rid of these errors, add "<strong>lights.pk3</strong>" as a map resource. "<strong>lights.pk3</strong>" can be found in GZDoom folder.<br />
|
||||
<span class="style1">If you are using Zandronum:</span><br />
|
||||
To get rid of these errors, add "<strong>zandronum.pk3</strong>" as a map resource. Don't forget to check "<strong>Exclude from testing parameters</strong>" chekbox while adding it, otherwise Zandronum won't load your map. "<strong>zandronum.pk3</strong>" can be found in Zandronum folder.</p><br />
|
||||
<p><strong>Q:</strong> I don't like the "fake contrast" (<a href="http://zdoom.org/wiki/Fake_contrast">zdoom.org/wiki/Fake_contrast</a>) GZDB uses to render sector walls in Visual mode. How can I disable this?<br />
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<li>"%PS" - source path.</li>
|
||||
</ul>
|
||||
<b class="fat">resultlump</b> (string)<br />
|
||||
The name of the lump compilation resuld should be stored in.<br />
|
||||
The name of the lump compilation result should be stored in.<br />
|
||||
<br />
|
||||
<br />
|
||||
<h2>Script Editor settings:</h2>
|
||||
|
|
8
Source/Core/Windows/MainForm.Designer.cs
generated
8
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -365,6 +365,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.menumain.Location = new System.Drawing.Point(0, 0);
|
||||
this.menumain.Name = "menumain";
|
||||
this.menumain.Size = new System.Drawing.Size(328, 24);
|
||||
this.menumain.ImageScalingSize = MainForm.ScaledIconSize;
|
||||
this.menumain.TabIndex = 0;
|
||||
//
|
||||
// menufile
|
||||
|
@ -1129,6 +1130,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// toolbar
|
||||
//
|
||||
this.toolbar.AutoSize = false;
|
||||
this.toolbar.ImageScalingSize = MainForm.ScaledIconSize;
|
||||
this.toolbar.ContextMenuStrip = this.toolbarContextMenu;
|
||||
this.toolbar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.toolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -1191,6 +1193,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toggleRendering});
|
||||
this.toolbarContextMenu.Name = "toolbarContextMenu";
|
||||
this.toolbarContextMenu.Size = new System.Drawing.Size(174, 224);
|
||||
this.toolbarContextMenu.ImageScalingSize = MainForm.ScaledIconSize;
|
||||
this.toolbarContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.toolbarContextMenu_Opening);
|
||||
this.toolbarContextMenu.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.toolbarContextMenu_Closing);
|
||||
//
|
||||
|
@ -1723,6 +1726,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.statusbar.Name = "statusbar";
|
||||
this.statusbar.ShowItemToolTips = true;
|
||||
this.statusbar.Size = new System.Drawing.Size(1012, 23);
|
||||
this.statusbar.ImageScalingSize = MainForm.ScaledIconSize;
|
||||
this.statusbar.TabIndex = 2;
|
||||
//
|
||||
// statuslabel
|
||||
|
@ -2179,6 +2183,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// modestoolbar
|
||||
//
|
||||
this.modestoolbar.AutoSize = false;
|
||||
this.modestoolbar.ImageScalingSize = MainForm.ScaledIconSize;
|
||||
this.modestoolbar.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.modestoolbar.Location = new System.Drawing.Point(0, 49);
|
||||
this.modestoolbar.Name = "modestoolbar";
|
||||
|
@ -2219,6 +2224,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.modecontrolsloolbar.Location = new System.Drawing.Point(328, 0);
|
||||
this.modecontrolsloolbar.Name = "modecontrolsloolbar";
|
||||
this.modecontrolsloolbar.Size = new System.Drawing.Size(43, 24);
|
||||
this.modecontrolsloolbar.ImageScalingSize = MainForm.ScaledIconSize;
|
||||
this.modecontrolsloolbar.TabIndex = 1;
|
||||
this.modecontrolsloolbar.Text = "toolStrip1";
|
||||
this.modecontrolsloolbar.Visible = false;
|
||||
|
@ -2460,7 +2466,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private ToolStripMenuItem itemimport;
|
||||
private ToolStripMenuItem itemexport;
|
||||
private ToolStripSeparator separatorio;
|
||||
private ToolStripMenuItem itemviewthingtypes;
|
||||
private ToolStripMenuItem itemviewthingtypes;
|
||||
private StatisticsControl statistics;
|
||||
private ToolStripSplitButton dynamiclightmode;
|
||||
private ToolStripMenuItem sightsdontshow;
|
||||
|
|
|
@ -196,6 +196,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
public string ActiveDockerTabName { get { return dockerspanel.IsCollpased ? "None" : dockerspanel.SelectedTabName; } }
|
||||
public bool IsActiveWindow { get { return windowactive; } }
|
||||
public StatusInfo Status { get { return status; } }
|
||||
public static Size ScaledIconSize = new Size(16, 16); //mxd
|
||||
public static SizeF DPIScaler = new SizeF(1.0f, 1.0f); //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -204,8 +206,31 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Constructor
|
||||
internal MainForm()
|
||||
{
|
||||
//mxd. Set DPI-aware icon size
|
||||
using(Graphics g = this.CreateGraphics())
|
||||
{
|
||||
DPIScaler = new SizeF(g.DpiX / 96, g.DpiY / 96);
|
||||
|
||||
if(DPIScaler.Width != 1.0f || DPIScaler.Height != 1.0f)
|
||||
{
|
||||
ScaledIconSize.Width = (int)Math.Round(ScaledIconSize.Width * DPIScaler.Width);
|
||||
ScaledIconSize.Height = (int)Math.Round(ScaledIconSize.Height * DPIScaler.Height);
|
||||
}
|
||||
}
|
||||
|
||||
// Setup controls
|
||||
InitializeComponent();
|
||||
|
||||
//mxd. Resize status labels
|
||||
if(DPIScaler.Width != 1.0f)
|
||||
{
|
||||
gridlabel.Width = (int)Math.Round(gridlabel.Width * DPIScaler.Width);
|
||||
zoomlabel.Width = (int)Math.Round(zoomlabel.Width * DPIScaler.Width);
|
||||
xposlabel.Width = (int)Math.Round(xposlabel.Width * DPIScaler.Width);
|
||||
yposlabel.Width = (int)Math.Round(yposlabel.Width * DPIScaler.Width);
|
||||
warnsLabel.Width = (int)Math.Round(warnsLabel.Width * DPIScaler.Width);
|
||||
}
|
||||
|
||||
pluginbuttons = new List<PluginToolbarButton>();
|
||||
editmodeitems = new List<ToolStripItem>();
|
||||
labelcollapsedinfo.Text = "";
|
||||
|
|
Loading…
Reference in a new issue