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:
RKrom 2014-11-11 13:23:59 +01:00
commit 61c2921b2a
16 changed files with 140 additions and 123 deletions

View file

@ -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;
}
}