mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-23 12:15:48 +02:00
Fix scrollbar in Options not working after focusing certain controls
This commit is contained in:
parent
c641a92d89
commit
28eb7d0810
Core/Other
@ -105,6 +105,10 @@ private void SelectTab(SettingsTab tab){
|
||||
tab.Button.BackColor = tab.Button.FlatAppearance.MouseDownBackColor;
|
||||
|
||||
if (!tab.IsInitialized){
|
||||
foreach(Control control in tab.Control.InteractiveControls){
|
||||
control.MouseLeave += control_MouseLeave;
|
||||
}
|
||||
|
||||
tab.Control.OnReady();
|
||||
}
|
||||
|
||||
@ -118,6 +122,10 @@ private void SelectTab(SettingsTab tab){
|
||||
currentTab = tab;
|
||||
}
|
||||
|
||||
private void control_MouseLeave(object sender, EventArgs e){
|
||||
panelContents.Focus();
|
||||
}
|
||||
|
||||
private class SettingsTab{
|
||||
public Button Button { get; }
|
||||
|
||||
|
@ -1,10 +1,22 @@
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using TweetDuck.Configuration;
|
||||
|
||||
namespace TweetDuck.Core.Other.Settings{
|
||||
class BaseTabSettings : UserControl{
|
||||
protected static UserConfig Config => Program.UserConfig;
|
||||
|
||||
public IEnumerable<Control> InteractiveControls{
|
||||
get{
|
||||
foreach(Panel panel in Controls.OfType<Panel>()){
|
||||
foreach(Control control in panel.Controls){
|
||||
yield return control;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseTabSettings(){
|
||||
Padding = new Padding(6);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user