+ add: configurable Zoom-Tooltip clear delay ([Settings2] ZoomTooltipTimeout=3200; in [ms])

This commit is contained in:
RaiKoHoff 2020-06-03 11:31:51 +02:00
parent 2c172943eb
commit 986b21f925
7 changed files with 22 additions and 14 deletions

View File

@ -55,6 +55,7 @@ SettingsVersion=4
;LocaleAnsiCodePageAnalysisBonus=33
;LexerSQLNumberSignAsComment=1
;ExitOnESCSkipLevel=2
;ZoomTooltipTimeout=3200
[Statusbar Settings]
;VisibleSections=0 1 12 14 2 4 5 6 7 8 9 10 11
;SectionPrefixes=Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,

View File

@ -1 +1 @@
602
603

View File

@ -3,7 +3,7 @@
<assemblyIdentity
name="Notepad3"
processorArchitecture="*"
version="5.20.602.1"
version="5.20.603.1"
type="win32"
/>
<description>Notepad3 BETA</description>

View File

@ -1219,6 +1219,9 @@ void LoadSettings()
Defaults2.ExitOnESCSkipLevel = 2;
Settings2.ExitOnESCSkipLevel = clampi(IniSectionGetInt(IniSecSettings2, L"ExitOnESCSkipLevel", Defaults2.ExitOnESCSkipLevel), 0, 2);
Defaults2.ZoomTooltipTimeout = 3200;
Settings2.ZoomTooltipTimeout = clampi(IniSectionGetInt(IniSecSettings2, L"ZoomTooltipTimeout", Defaults2.ZoomTooltipTimeout), 0, 10000);
// --------------------------------------------------------------------------
// Settings: IniSecSettings
// --------------------------------------------------------------------------

View File

@ -10662,19 +10662,22 @@ void SetNotifyIconTitle(HWND hwnd)
//
void ShowZoomCallTip()
{
int const iZoomLevelPercent = SciCall_GetZoom();
int const delayClr = Settings2.ZoomTooltipTimeout;
if (delayClr >= (10*USER_TIMER_MINIMUM)) {
int const iZoomLevelPercent = SciCall_GetZoom();
char chToolTip[32] = { '\0' };
StringCchPrintfA(chToolTip, COUNTOF(chToolTip), "Zoom: %i%%", iZoomLevelPercent);
char chToolTip[32] = { '\0' };
StringCchPrintfA(chToolTip, COUNTOF(chToolTip), "Zoom: %i%%", iZoomLevelPercent);
DocPos const iPos = SciCall_PositionFromLine(SciCall_GetFirstVisibleLine());
DocPos const iPos = SciCall_PositionFromLine(SciCall_GetFirstVisibleLine());
int const iXOff = SciCall_GetXOffset();
SciCall_SetXOffset(0);
SciCall_CallTipShow(iPos, chToolTip);
SciCall_SetXOffset(iXOff);
Globals.CallTipType = CT_ZOOM;
_DelayClearZoomCallTip(3200);
int const iXOff = SciCall_GetXOffset();
SciCall_SetXOffset(0);
SciCall_CallTipShow(iPos, chToolTip);
SciCall_SetXOffset(iXOff);
Globals.CallTipType = CT_ZOOM;
_DelayClearZoomCallTip(delayClr);
}
}

View File

@ -530,6 +530,7 @@ typedef struct _settings2_t
bool NoCutLineOnEmptySelection;
bool LexerSQLNumberSignAsComment;
int ExitOnESCSkipLevel;
int ZoomTooltipTimeout;
float AnalyzeReliableConfidenceLevel;
float LocaleAnsiCodePageAnalysisBonus;

View File

@ -8,7 +8,7 @@
#define SAPPNAME "Notepad3"
#define VERSION_MAJOR 5
#define VERSION_MINOR 20
#define VERSION_REV 602
#define VERSION_REV 603
#define VERSION_BUILD 1
#define SCINTILLA_VER 433
#define ONIGURUMA_REGEX_VER 6.9.5
@ -16,4 +16,4 @@
#define TINYEXPR_VER 2018.05.11
#define UTHASH_VER 2.1.0
#define VERSION_PATCH BETA
#define VERSION_COMMIT_ID dkt1-amr
#define VERSION_COMMIT_ID t7820-rk