mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
Enable mouse wheel in commit message TextBox
This commit is contained in:
parent
1587e65479
commit
e8ef47f33d
2 changed files with 13 additions and 1 deletions
|
@ -343,7 +343,8 @@
|
|||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
helpers:TextBoxHelper.Placeholder="Enter commit message"
|
||||
helpers:TextBoxHelper.PlaceholderBaseline="Top">
|
||||
helpers:TextBoxHelper.PlaceholderBaseline="Top"
|
||||
PreviewMouseWheel="CommitMsgPreviewMouseWheel">
|
||||
<TextBox.Text>
|
||||
<Binding ElementName="me" Path="CommitMessage" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
|
|
|
@ -683,6 +683,17 @@ namespace SourceGit.UI {
|
|||
#endregion
|
||||
|
||||
#region COMMIT_PANEL
|
||||
private void CommitMsgPreviewMouseWheel(object sender, MouseWheelEventArgs e) {
|
||||
var textBox = sender as TextBox;
|
||||
if (textBox == null) return;
|
||||
|
||||
if (e.Delta > 0) {
|
||||
textBox.LineUp();
|
||||
} else {
|
||||
textBox.LineDown();
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenCommitMessageSelector(object sender, RoutedEventArgs e) {
|
||||
var anchor = sender as Button;
|
||||
|
||||
|
|
Loading…
Reference in a new issue