mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Improved the drawing of the speechbubble, now one can resize it "the wrong way" and it is still drawn correctly. Made the counting labels to appear directly centered to the mouse, this simplifies placing them. Also removed the possibility to resize them. Fixed a bug where the tool-buttons were not being disabled, if another tool is selected or ESC is pressed.
This commit is contained in:
parent
0e3f5d1cbb
commit
db8b2cb2c5
4 changed files with 30 additions and 17 deletions
|
@ -48,20 +48,33 @@ namespace Greenshot.Drawing {
|
|||
InitContent();
|
||||
}
|
||||
|
||||
public override void ShowGrippers() {
|
||||
}
|
||||
|
||||
public override void HideGrippers() {
|
||||
}
|
||||
|
||||
public override bool InitContent() {
|
||||
_defaultEditMode = EditStatus.IDLE;
|
||||
_stringFormat.Alignment = StringAlignment.Center;
|
||||
_stringFormat.LineAlignment = StringAlignment.Center;
|
||||
|
||||
// Set defaults
|
||||
Width = 40;
|
||||
Height = 40;
|
||||
Width = 30;
|
||||
Height = 30;
|
||||
using (FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name)) {
|
||||
_font = new Font(fam, 18, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
_font = new Font(fam, 14, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This makes it possible for the label to be placed exactly in the middle of the pointer.
|
||||
/// </summary>
|
||||
public override bool HandleMouseDown(int mouseX, int mouseY) {
|
||||
return base.HandleMouseDown(mouseX - (Width / 2), mouseY - (Height / 2));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We set our own field values
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue