mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
This change should make the UI Icon Size setting dynamic, clearing all cached icons when the size changes (in the settings UI) so if they have a dynamic size the best is selected.
This commit is contained in:
parent
c50e5fa5ab
commit
61c2921b2a
16 changed files with 140 additions and 123 deletions
|
@ -33,16 +33,8 @@ namespace GreenshotOCR {
|
|||
private static OCRConfiguration config = IniConfig.GetIniSection<OCRConfiguration>();
|
||||
private const int MIN_WIDTH = 130;
|
||||
private const int MIN_HEIGHT = 130;
|
||||
private static Image icon = null;
|
||||
private OcrPlugin plugin;
|
||||
|
||||
static OCRDestination() {
|
||||
string exePath = PluginUtils.GetExePath("MSPVIEW.EXE");
|
||||
if (exePath != null && File.Exists(exePath)) {
|
||||
icon = PluginUtils.GetExeIcon(exePath, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override string Designation {
|
||||
get {
|
||||
return "OCR";
|
||||
|
@ -57,7 +49,11 @@ namespace GreenshotOCR {
|
|||
|
||||
public override Image DisplayIcon {
|
||||
get {
|
||||
return icon;
|
||||
string exePath = PluginUtils.GetExePath("MSPVIEW.EXE");
|
||||
if (exePath != null && File.Exists(exePath)) {
|
||||
return PluginUtils.GetCachedExeIcon(exePath, 0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue