mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ chg: initial default big toolbar only for monitors > Full-HD
+ opt: LexerSQLNumberSignAsComment [Settings2]
This commit is contained in:
parent
cbaf98e0b9
commit
f80915b8a5
@ -50,6 +50,7 @@ SettingsVersion=4
|
||||
;AdministrationTool.exe=
|
||||
;DevDebugMode=0
|
||||
;AnalyzeReliableConfidenceLevel=50
|
||||
;LexerSQLNumberSignAsComment=1
|
||||
[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 ,
|
||||
|
||||
@ -1 +1 @@
|
||||
2654
|
||||
2655
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<assemblyIdentity
|
||||
name="Notepad3"
|
||||
processorArchitecture="*"
|
||||
version="5.19.927.2654"
|
||||
version="5.19.927.2655"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Notepad3 BETA</description>
|
||||
|
||||
@ -824,6 +824,10 @@ void LoadSettings()
|
||||
StringCchCopyW(Defaults2.WebTemplate2, COUNTOF(Defaults2.WebTemplate2), L"https://en.wikipedia.org/w/index.php?search=%s");
|
||||
IniSectionGetString(Settings2_Section, L"WebTemplate2", Defaults2.WebTemplate2, Settings2.WebTemplate2, COUNTOF(Settings2.WebTemplate2));
|
||||
|
||||
Defaults2.LexerSQLNumberSignAsComment = true;
|
||||
Settings2.LexerSQLNumberSignAsComment = IniSectionGetBool(Settings2_Section, L"LexerSQLNumberSignAsComment", Defaults2.LexerSQLNumberSignAsComment);
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
const WCHAR* const Settings_Section = L"Settings";
|
||||
// --------------------------------------------------------------------------
|
||||
@ -1072,8 +1076,8 @@ void LoadSettings()
|
||||
StringCchPrintf(tchHighDpiToolBar, COUNTOF(tchHighDpiToolBar), L"%ix%i HighDpiToolBar", ResX, ResY);
|
||||
s_iToolBarTheme = IniSectionGetInt(Window_Section, tchHighDpiToolBar, -1);
|
||||
s_iToolBarTheme = clampi(s_iToolBarTheme, -1, StrIsEmpty(s_tchToolbarBitmap) ? 1 : 2);
|
||||
if (s_iToolBarTheme < 0) { // undefined: determine high DPI (higher than Full-HD)
|
||||
s_iToolBarTheme = IsFullHDOrHigher(Globals.hwndMain, ResX, ResY) ? 1 : 0;
|
||||
if (s_iToolBarTheme < 0) { // undefined: determine higher than Full-HD
|
||||
s_iToolBarTheme = (IsFullHD(Globals.hwndMain, -1, -1) <= 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@ -231,16 +231,17 @@ inline void GetCurrentMonitorResolution(HWND hwnd, int* pCXScreen, int* pCYScree
|
||||
*pCYScreen = (mi.rcMonitor.bottom - mi.rcMonitor.top);
|
||||
}
|
||||
|
||||
inline bool IsFullHDOrHigher(HWND hwnd, int resX, int resY)
|
||||
// FullHD? => 0:'==', -1:'<', +1:'>'
|
||||
inline int IsFullHD(HWND hwnd, int resX, int resY)
|
||||
{
|
||||
int cxScreen, cyScreen;
|
||||
GetCurrentMonitorResolution(hwnd, &cxScreen, &cyScreen);
|
||||
if (resX <= 0) { resX = cxScreen; }
|
||||
if (resY <= 0) { resY = cxScreen; }
|
||||
return ((resX >= 1920) && (resY >= 1080));
|
||||
if (resY <= 0) { resY = cyScreen; }
|
||||
return ((resX == 1920) && (resY == 1080)) ? 0 : (((resX < 1920) || (resY < 1080)) ? -1 : +1);
|
||||
}
|
||||
|
||||
inline float GetBaseFontSize(HWND hwnd) { return (IsFullHDOrHigher(hwnd, -1, -1) ? 11.0f : 10.0f); }
|
||||
inline float GetBaseFontSize(HWND hwnd) { return ((IsFullHD(hwnd, -1, -1) < 0) ? 10.0f : 11.0f); }
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -891,7 +891,7 @@ void Style_SetLexerSpecificProperties(const int lexerId)
|
||||
case SCLEX_SQL:
|
||||
SciCall_SetProperty("sql.backslash.escapes", "1");
|
||||
SciCall_SetProperty("lexer.sql.backticks.identifier", "1");
|
||||
SciCall_SetProperty("lexer.sql.numbersign.comment", "1");
|
||||
SciCall_SetProperty("lexer.sql.numbersign.comment", Settings2.LexerSQLNumberSignAsComment ? "1" : "0");
|
||||
break;
|
||||
|
||||
case SCLEX_NSIS:
|
||||
|
||||
@ -502,6 +502,7 @@ typedef struct _settings2_t
|
||||
int CurrentLineVerticalSlop;
|
||||
bool NoCopyLineOnEmptySelection;
|
||||
bool NoCutLineOnEmptySelection;
|
||||
bool LexerSQLNumberSignAsComment;
|
||||
|
||||
float AnalyzeReliableConfidenceLevel;
|
||||
//~float ReliableCEDConfidenceMapping; // = 0.85f;
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 19
|
||||
#define VERSION_REV 927
|
||||
#define VERSION_BUILD 2654
|
||||
#define VERSION_BUILD 2655
|
||||
#define SCINTILLA_VER 420
|
||||
#define ONIGURUMA_REGEX_VER 6.9.3
|
||||
#define UCHARDET_VER 2018.09.27
|
||||
|
||||
Loading…
Reference in New Issue
Block a user