mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -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.HorizontalScrollBarVisibility="Disabled"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
helpers:TextBoxHelper.Placeholder="Enter commit message"
|
helpers:TextBoxHelper.Placeholder="Enter commit message"
|
||||||
helpers:TextBoxHelper.PlaceholderBaseline="Top">
|
helpers:TextBoxHelper.PlaceholderBaseline="Top"
|
||||||
|
PreviewMouseWheel="CommitMsgPreviewMouseWheel">
|
||||||
<TextBox.Text>
|
<TextBox.Text>
|
||||||
<Binding ElementName="me" Path="CommitMessage" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
<Binding ElementName="me" Path="CommitMessage" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
||||||
<Binding.ValidationRules>
|
<Binding.ValidationRules>
|
||||||
|
|
|
@ -683,6 +683,17 @@ namespace SourceGit.UI {
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region COMMIT_PANEL
|
#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) {
|
private void OpenCommitMessageSelector(object sender, RoutedEventArgs e) {
|
||||||
var anchor = sender as Button;
|
var anchor = sender as Button;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue