Fix classic scaling on high dpi displays
This commit is contained in:
parent
bfa7f5cca9
commit
27c74e52ca
55 changed files with 2290 additions and 1947 deletions
|
|
@ -186,8 +186,8 @@
|
|||
//
|
||||
// ProcessBookControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.Controls.Add(this.moveLastBtn);
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
//
|
||||
// ProcessBookForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.ClientSize = new System.Drawing.Size(522, 638);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||
this.Name = "ProcessBookForm";
|
||||
|
|
|
|||
|
|
@ -336,8 +336,8 @@
|
|||
//
|
||||
// ProcessQueueControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace LibationWinForms.ProcessQueue
|
|||
|
||||
|
||||
var control = InitControl(0);
|
||||
VirtualControlHeight = control.Height + control.Margin.Top + control.Margin.Bottom;
|
||||
VirtualControlHeight = this.DpiUnscale(control.Height + control.Margin.Top + control.Margin.Bottom);
|
||||
TopMargin = control.Margin.Top;
|
||||
|
||||
BookControls.Add(control);
|
||||
|
|
@ -123,7 +123,7 @@ namespace LibationWinForms.ProcessQueue
|
|||
|
||||
vScrollBar1.Scroll += (_, s) => SetScrollPosition(s.NewValue);
|
||||
vScrollBar1.SmallChange = SmallScrollChange;
|
||||
panel1.Height += NUM_BLANK_SPACES_AT_BOTTOM * VirtualControlHeight;
|
||||
panel1.Height += this.DpiScale(NUM_BLANK_SPACES_AT_BOTTOM * VirtualControlHeight);
|
||||
}
|
||||
|
||||
private ProcessBookControl InitControl(int locationY)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue