mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-21 15:15:48 +02:00
Fix Win+Arrow and Win+Shift+Arrow not saving new window location
Closes #135
This commit is contained in:
parent
850873aec8
commit
1efe2a56af
8
Core/FormBrowser.Designer.cs
generated
8
Core/FormBrowser.Designer.cs
generated
@ -26,8 +26,14 @@ private void InitializeComponent() {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.trayIcon = new TweetDuck.Core.TrayIcon(this.components);
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.timerResize = new System.Windows.Forms.Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// timerResize
|
||||
//
|
||||
this.timerResize.Interval = 500;
|
||||
this.timerResize.Tick += new System.EventHandler(this.timerResize_Tick);
|
||||
//
|
||||
// FormBrowser
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -42,6 +48,7 @@ private void InitializeComponent() {
|
||||
this.Activated += new System.EventHandler(this.FormBrowser_Activated);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormBrowser_FormClosing);
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormBrowser_FormClosed);
|
||||
this.LocationChanged += new System.EventHandler(this.FormBrowser_LocationChanged);
|
||||
this.ResizeEnd += new System.EventHandler(this.FormBrowser_ResizeEnd);
|
||||
this.Resize += new System.EventHandler(this.FormBrowser_Resize);
|
||||
this.ResumeLayout(false);
|
||||
@ -52,6 +59,7 @@ private void InitializeComponent() {
|
||||
|
||||
private TrayIcon trayIcon;
|
||||
private System.Windows.Forms.ToolTip toolTip;
|
||||
private System.Windows.Forms.Timer timerResize;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,12 +208,23 @@ private void browser_LoadError(object sender, LoadErrorEventArgs e){
|
||||
}
|
||||
}
|
||||
|
||||
private void timerResize_Tick(object sender, EventArgs e){
|
||||
FormBrowser_ResizeEnd(this, e); // also stops timer
|
||||
}
|
||||
|
||||
private void FormBrowser_Activated(object sender, EventArgs e){
|
||||
if (!isLoaded)return;
|
||||
|
||||
trayIcon.HasNotifications = false;
|
||||
}
|
||||
|
||||
private void FormBrowser_LocationChanged(object sender, EventArgs e){
|
||||
if (!isLoaded)return;
|
||||
|
||||
timerResize.Stop();
|
||||
timerResize.Start();
|
||||
}
|
||||
|
||||
private void FormBrowser_Resize(object sender, EventArgs e){
|
||||
if (!isLoaded)return;
|
||||
|
||||
@ -229,11 +240,17 @@ private void FormBrowser_Resize(object sender, EventArgs e){
|
||||
FormBrowser_ResizeEnd(sender, e);
|
||||
}
|
||||
}
|
||||
else{
|
||||
timerResize.Stop();
|
||||
timerResize.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private void FormBrowser_ResizeEnd(object sender, EventArgs e){ // also triggers when the window moves
|
||||
if (!isLoaded)return;
|
||||
|
||||
timerResize.Stop();
|
||||
|
||||
if (Location != ControlExtensions.InvisibleLocation){
|
||||
Config.BrowserWindow.Save(this);
|
||||
Config.Save();
|
||||
|
@ -117,11 +117,13 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing">
|
||||
<metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</data>
|
||||
<data name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing">
|
||||
</metadata>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>112, 17</value>
|
||||
</data>
|
||||
</metadata>
|
||||
<metadata name="timerResize.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>202, 17</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user