mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-09 06:15:49 +02:00
Add support for ctrl+a shortcut in multiline textboxes
This commit is contained in:
parent
342ac51cda
commit
8dce99b8b3
Core
@ -34,5 +34,15 @@ public static void SetValueSafe(this TrackBar trackBar, int value){
|
||||
trackBar.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void EnableMultilineShortcuts(this TextBox textBox){
|
||||
textBox.KeyDown += (sender, args) => {
|
||||
if (args.Control && args.KeyCode == Keys.A){
|
||||
((TextBox)sender).SelectAll();
|
||||
args.SuppressKeyPress = true;
|
||||
args.Handled = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using TweetDck.Core.Controls;
|
||||
|
||||
namespace TweetDck.Core.Other.Settings.Dialogs{
|
||||
sealed partial class DialogSettingsCSS : Form{
|
||||
@ -19,8 +20,11 @@ public DialogSettingsCSS(){
|
||||
InitializeComponent();
|
||||
|
||||
Text = Program.BrandName+" Settings - CSS";
|
||||
|
||||
|
||||
textBoxBrowserCSS.EnableMultilineShortcuts();
|
||||
textBoxBrowserCSS.Text = Program.UserConfig.CustomBrowserCSS ?? "";
|
||||
|
||||
textBoxNotificationCSS.EnableMultilineShortcuts();
|
||||
textBoxNotificationCSS.Text = Program.UserConfig.CustomNotificationCSS ?? "";
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using TweetDck.Core.Controls;
|
||||
using TweetDck.Core.Utils;
|
||||
|
||||
namespace TweetDck.Core.Other.Settings.Dialogs{
|
||||
@ -14,7 +15,8 @@ public DialogSettingsCefArgs(){
|
||||
InitializeComponent();
|
||||
|
||||
Text = Program.BrandName+" Settings - CEF Arguments";
|
||||
|
||||
|
||||
textBoxArgs.EnableMultilineShortcuts();
|
||||
textBoxArgs.Text = Program.UserConfig.CustomCefArgs ?? "";
|
||||
textBoxArgs.Select(textBoxArgs.Text.Length, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user