mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
FEATURE-758: This commit enhances the already made changes to also fix the size of the icons in the destination picker and the context menu. On top of that, if a large icon size is selected we try to get a larger (more defined) icon from the application unfortunately that doesn't improve the build in icons.
This commit is contained in:
parent
1da7d028a0
commit
9df25bdd76
13 changed files with 129 additions and 27 deletions
|
@ -256,9 +256,18 @@ namespace GreenshotPlugin.Core {
|
|||
[IniProperty("LastCapturedRegion", Description = "The last used region, for reuse in the capture last region")]
|
||||
public Rectangle LastCapturedRegion;
|
||||
|
||||
[IniProperty("IconSize", Description = "Defines the size of the icons (e.g. for the buttons in the editor), default value 16,16 anything bigger will cause scaling", DefaultValue = "16,16")]
|
||||
public Size IconSize;
|
||||
|
||||
// Specifies what THIS build is
|
||||
public BuildStates BuildState = BuildStates.RELEASE_CANDIDATE;
|
||||
|
||||
public bool UseLargeIcons {
|
||||
get {
|
||||
return IconSize.Width >= 32 || IconSize.Height >= 32;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A helper method which returns true if the supplied experimental feature is enabled
|
||||
/// </summary>
|
||||
|
@ -432,6 +441,30 @@ namespace GreenshotPlugin.Core {
|
|||
if (OutputFileReduceColorsTo > 256) {
|
||||
OutputFileReduceColorsTo = 256;
|
||||
}
|
||||
FixIconSize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validation & correction of the icon size
|
||||
/// </summary>
|
||||
public void FixIconSize() {
|
||||
if (IconSize == Size.Empty) {
|
||||
IconSize = new Size(16, 16);
|
||||
} else {
|
||||
if (IconSize.Width < 16) {
|
||||
IconSize.Width = 16;
|
||||
}
|
||||
if (IconSize.Width > 256) {
|
||||
IconSize.Width = 256;
|
||||
}
|
||||
if (IconSize.Height < 16) {
|
||||
IconSize.Height = 16;
|
||||
}
|
||||
if (IconSize.Height > 256) {
|
||||
IconSize.Height = 256;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue