mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-25 12:41:34 +03:00
Moving form now updates splitter bounds
This commit is contained in:
parent
dc79f4dcef
commit
8aa5d67d6e
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@ -12,6 +11,8 @@ namespace DarkUI
|
|||||||
#region Field Region
|
#region Field Region
|
||||||
|
|
||||||
private List<DarkDockGroup> _groups;
|
private List<DarkDockGroup> _groups;
|
||||||
|
|
||||||
|
private Form _parentForm;
|
||||||
private DarkDockSplitter _splitter;
|
private DarkDockSplitter _splitter;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -191,6 +192,20 @@ namespace DarkUI
|
|||||||
|
|
||||||
#region Event Handler Region
|
#region Event Handler Region
|
||||||
|
|
||||||
|
protected override void OnCreateControl()
|
||||||
|
{
|
||||||
|
base.OnCreateControl();
|
||||||
|
|
||||||
|
_parentForm = FindForm();
|
||||||
|
_parentForm.ResizeEnd += ParentForm_ResizeEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ParentForm_ResizeEnd(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
if (_splitter != null)
|
||||||
|
_splitter.UpdateBounds();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnLayout(LayoutEventArgs e)
|
protected override void OnLayout(LayoutEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnLayout(e);
|
base.OnLayout(e);
|
||||||
|
@ -19,6 +19,7 @@ namespace DarkUI
|
|||||||
public DarkTranslucentForm(Color backColor, double opacity = 0.6)
|
public DarkTranslucentForm(Color backColor, double opacity = 0.6)
|
||||||
{
|
{
|
||||||
FormBorderStyle = FormBorderStyle.None;
|
FormBorderStyle = FormBorderStyle.None;
|
||||||
|
Size = new Size(0, 0);
|
||||||
ShowInTaskbar = false;
|
ShowInTaskbar = false;
|
||||||
AllowTransparency = true;
|
AllowTransparency = true;
|
||||||
Opacity = opacity;
|
Opacity = opacity;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user