mirror of
https://github.com/greenshot/greenshot
synced 2025-07-30 03:30:02 -07:00
Replaced the EnableButtonScaling with the possibility to specify the ButtonIconSize directly. Also removed a lot of the fixed size, as they are calculated correctly. Changed the background of the Toolstrips to System.Drawing.SystemColors.Control.
This commit is contained in:
parent
7fdd324ef0
commit
634a4cf262
3 changed files with 87 additions and 231 deletions
|
@ -54,17 +54,19 @@ namespace Greenshot.Configuration {
|
||||||
public bool ReuseEditor;
|
public bool ReuseEditor;
|
||||||
[IniProperty("FreehandSensitivity", Description = "The smaller this number, the less smoothing is used. Decrease for detailed drawing, e.g. when using a pen. Increase for smoother lines. e.g. when you want to draw a smooth line.", DefaultValue = "3")]
|
[IniProperty("FreehandSensitivity", Description = "The smaller this number, the less smoothing is used. Decrease for detailed drawing, e.g. when using a pen. Increase for smoother lines. e.g. when you want to draw a smooth line.", DefaultValue = "3")]
|
||||||
public int FreehandSensitivity;
|
public int FreehandSensitivity;
|
||||||
[IniProperty("EnableButtonScaling", Description = "Experimental DPI scaling for the buttons", DefaultValue = "false")]
|
|
||||||
public bool EnableButtonScaling;
|
|
||||||
|
|
||||||
[IniProperty("SuppressSaveDialogAtClose", Description="Suppressed the 'do you want to save' dialog when closing the editor.", DefaultValue="False")]
|
[IniProperty("SuppressSaveDialogAtClose", Description="Suppressed the 'do you want to save' dialog when closing the editor.", DefaultValue="False")]
|
||||||
public bool SuppressSaveDialogAtClose;
|
public bool SuppressSaveDialogAtClose;
|
||||||
|
[IniProperty("ButtonIconSize", Description = "Defines the size of the icons for the buttons in the editor, default value 16,16 anything bigger will cause scaling", DefaultValue = "16,16")]
|
||||||
|
public Size ButtonIconSize;
|
||||||
|
|
||||||
public override void AfterLoad() {
|
public override void AfterLoad() {
|
||||||
base.AfterLoad();
|
base.AfterLoad();
|
||||||
if (RecentColors == null) {
|
if (RecentColors == null) {
|
||||||
RecentColors = new List<Color>();
|
RecentColors = new List<Color>();
|
||||||
}
|
}
|
||||||
|
if (ButtonIconSize == Size.Empty) {
|
||||||
|
ButtonIconSize = new Size(16,16);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <param name="requestingType">Type of the class for which to create the field</param>
|
/// <param name="requestingType">Type of the class for which to create the field</param>
|
||||||
/// <param name="fieldType">FieldType of the field to construct</param>
|
/// <param name="fieldType">FieldType of the field to construct</param>
|
||||||
|
|
298
Greenshot/Forms/ImageEditorForm.Designer.cs
generated
298
Greenshot/Forms/ImageEditorForm.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -263,11 +263,11 @@ namespace Greenshot {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
toolStrip1.Items.Insert(toolStrip1.Items.IndexOf(toolStripSeparator16), destinationButton);
|
destinationsToolStrip.Items.Insert(destinationsToolStrip.Items.IndexOf(toolStripSeparator16), destinationButton);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ToolStripButton destinationButton = new ToolStripButton();
|
ToolStripButton destinationButton = new ToolStripButton();
|
||||||
toolStrip1.Items.Insert(toolStrip1.Items.IndexOf(toolStripSeparator16), destinationButton);
|
destinationsToolStrip.Items.Insert(destinationsToolStrip.Items.IndexOf(toolStripSeparator16), destinationButton);
|
||||||
destinationButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
|
destinationButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
|
||||||
destinationButton.Size = new Size(23, 22);
|
destinationButton.Size = new Size(23, 22);
|
||||||
destinationButton.Text = toolstripDestination.Description;
|
destinationButton.Text = toolstripDestination.Description;
|
||||||
|
@ -1025,8 +1025,8 @@ namespace Greenshot {
|
||||||
// disable most controls
|
// disable most controls
|
||||||
if(!controlsDisabledDueToConfirmable) {
|
if(!controlsDisabledDueToConfirmable) {
|
||||||
ToolStripItemEndisabler.Disable(menuStrip1);
|
ToolStripItemEndisabler.Disable(menuStrip1);
|
||||||
ToolStripItemEndisabler.Disable(toolStrip1);
|
ToolStripItemEndisabler.Disable(destinationsToolStrip);
|
||||||
ToolStripItemEndisabler.Disable(toolStrip2);
|
ToolStripItemEndisabler.Disable(toolsToolStrip);
|
||||||
ToolStripItemEndisabler.Enable(closeToolStripMenuItem);
|
ToolStripItemEndisabler.Enable(closeToolStripMenuItem);
|
||||||
ToolStripItemEndisabler.Enable(helpToolStripMenuItem);
|
ToolStripItemEndisabler.Enable(helpToolStripMenuItem);
|
||||||
ToolStripItemEndisabler.Enable(aboutToolStripMenuItem);
|
ToolStripItemEndisabler.Enable(aboutToolStripMenuItem);
|
||||||
|
@ -1036,8 +1036,8 @@ namespace Greenshot {
|
||||||
} else if(controlsDisabledDueToConfirmable) {
|
} else if(controlsDisabledDueToConfirmable) {
|
||||||
// re-enable disabled controls, confirmable element has either been confirmed or cancelled
|
// re-enable disabled controls, confirmable element has either been confirmed or cancelled
|
||||||
ToolStripItemEndisabler.Enable(menuStrip1);
|
ToolStripItemEndisabler.Enable(menuStrip1);
|
||||||
ToolStripItemEndisabler.Enable(toolStrip1);
|
ToolStripItemEndisabler.Enable(destinationsToolStrip);
|
||||||
ToolStripItemEndisabler.Enable(toolStrip2);
|
ToolStripItemEndisabler.Enable(toolsToolStrip);
|
||||||
controlsDisabledDueToConfirmable = false;
|
controlsDisabledDueToConfirmable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue