mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-05 11:34:07 +02:00
Fix the About Form not starting centered to parent
This commit is contained in:
parent
e4853b6697
commit
d235ea85ef
@ -8,6 +8,7 @@
|
||||
using System.Text;
|
||||
using TweetDick.Core.Handling;
|
||||
using TweetDick.Core.Other;
|
||||
using System.Drawing;
|
||||
|
||||
namespace TweetDick.Core{
|
||||
public partial class FormBrowser : Form{
|
||||
@ -47,6 +48,11 @@ protected override void WndProc(ref Message m){
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowChildForm(Form form){
|
||||
form.Show(this);
|
||||
form.Location = new Point(Location.X+Width/2-form.Width/2,Location.Y+Height/2-form.Height/2);
|
||||
}
|
||||
|
||||
// window setup
|
||||
|
||||
private void SetupWindow(){
|
||||
@ -108,7 +114,7 @@ public void OpenAbout(){
|
||||
else{
|
||||
currentFormAbout = new FormAbout();
|
||||
currentFormAbout.FormClosed += (sender, args) => currentFormAbout = null;
|
||||
currentFormAbout.Show(this);
|
||||
ShowChildForm(currentFormAbout);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user