mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
Fix for BUG-1698: the focus lost event on the editor element "font family" caused the key handling for the element (l -> line etc) to be active again, this change suppresses this.
This commit is contained in:
parent
1582b01e03
commit
cfb4711692
2 changed files with 18 additions and 14 deletions
|
@ -154,8 +154,11 @@ namespace Greenshot.Drawing {
|
||||||
if (e.PropertyName.Equals("Selected")) {
|
if (e.PropertyName.Equals("Selected")) {
|
||||||
if (!Selected && _textBox.Visible) {
|
if (!Selected && _textBox.Visible) {
|
||||||
HideTextBox();
|
HideTextBox();
|
||||||
} else if (Selected && Status==EditStatus.DRAWING) {
|
} else if (Selected && Status == EditStatus.DRAWING) {
|
||||||
ShowTextBox();
|
ShowTextBox();
|
||||||
|
} else if (Selected && Status == EditStatus.IDLE && _textBox.Visible) {
|
||||||
|
// Fix (workaround) for BUG-1698
|
||||||
|
_parent.KeysLocked = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_textBox.Visible) {
|
if (_textBox.Visible) {
|
||||||
|
@ -199,22 +202,22 @@ namespace Greenshot.Drawing {
|
||||||
private void ShowTextBox() {
|
private void ShowTextBox() {
|
||||||
_parent.KeysLocked = true;
|
_parent.KeysLocked = true;
|
||||||
_parent.Controls.Add(_textBox);
|
_parent.Controls.Add(_textBox);
|
||||||
EnsureTextBoxContrast();
|
EnsureTextBoxContrast();
|
||||||
_textBox.Show();
|
_textBox.Show();
|
||||||
_textBox.Focus();
|
_textBox.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Makes textbox background dark if text color is very bright
|
/// Makes textbox background dark if text color is very bright
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void EnsureTextBoxContrast() {
|
private void EnsureTextBoxContrast() {
|
||||||
Color lc = GetFieldValueAsColor(FieldType.LINE_COLOR);
|
Color lc = GetFieldValueAsColor(FieldType.LINE_COLOR);
|
||||||
if (lc.R > 203 && lc.G > 203 && lc.B > 203) {
|
if (lc.R > 203 && lc.G > 203 && lc.B > 203) {
|
||||||
_textBox.BackColor = Color.FromArgb(51, 51, 51);
|
_textBox.BackColor = Color.FromArgb(51, 51, 51);
|
||||||
} else {
|
} else {
|
||||||
_textBox.BackColor = Color.White;
|
_textBox.BackColor = Color.White;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HideTextBox() {
|
private void HideTextBox() {
|
||||||
_parent.Focus();
|
_parent.Focus();
|
||||||
|
|
|
@ -15,6 +15,7 @@ Changes:
|
||||||
|
|
||||||
Bugs Resolved:
|
Bugs Resolved:
|
||||||
* BUG-1686: Shadow (drop shadow or torn edge) grows if a filter (highlight etc) is used and an element is moved around
|
* BUG-1686: Shadow (drop shadow or torn edge) grows if a filter (highlight etc) is used and an element is moved around
|
||||||
|
* BUG-1698: Cannot enter textbox/Speechbubble lowercase text after changing font family
|
||||||
* BUG-1700: IE capture only works once
|
* BUG-1700: IE capture only works once
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue