mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+chg: reusing size: definition of "Indentation Guide" scheme settings for text area offset to margin area
This commit is contained in:
parent
16208cb2e2
commit
fb0605f655
@ -2520,6 +2520,9 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl)
|
||||
SciCall_SetMarginTypeN(MARGIN_SCI_FOLDING, SC_MARGIN_COLOUR);
|
||||
SciCall_SetMarginMaskN(MARGIN_SCI_FOLDING, SC_MASK_FOLDERS);
|
||||
|
||||
//~SciCall_SetMarginLeft(1); ~ set by STYLE_INDENTGUIDE
|
||||
//~SciCall_SetMarginRight(1);
|
||||
|
||||
SciCall_SetEOLMode(Settings.DefaultEOLMode);
|
||||
SciCall_SetPasteConvertEndings(true);
|
||||
SciCall_UsePopUp(SC_POPUP_TEXT);
|
||||
|
||||
@ -662,6 +662,8 @@ DeclareSciCallV2(SetMarginCursorN, SETMARGINCURSORN, uintptr_t, margin, int, cur
|
||||
DeclareSciCallV2(SetFoldMarginColour, SETFOLDMARGINCOLOUR, bool, useSetting, COLORREF, colour);
|
||||
DeclareSciCallV2(SetFoldMarginHiColour, SETFOLDMARGINHICOLOUR, bool, useSetting, COLORREF, colour);
|
||||
DeclareSciCallV01(SetDefaultFoldDisplayText, SETDEFAULTFOLDDISPLAYTEXT, const char*, text);
|
||||
DeclareSciCallV01(SetMarginLeft, SETMARGINLEFT, int, width);
|
||||
DeclareSciCallV01(SetMarginRight, SETMARGINRIGHT, int, width);
|
||||
|
||||
DeclareSciCallR2(TextWidth, TEXTWIDTH, int, int, styleNumber, const char *, text);
|
||||
|
||||
|
||||
14
src/Styles.c
14
src/Styles.c
@ -4100,9 +4100,17 @@ void Style_SetStyles(HWND hwnd, const int iStyle, LPCWSTR lpszStyle, const float
|
||||
}
|
||||
|
||||
// Size values are relative to BaseFontSize/CurrentFontSize
|
||||
float fFontSize = fBaseFontSize;
|
||||
Style_StrGetSizeFloatEx(lpszStyle, &fFontSize);
|
||||
SendMessage(hwnd, SCI_STYLESETSIZEFRACTIONAL, iStyle, f2int(fFontSize * SC_FONT_SIZE_MULTIPLIER));
|
||||
if (iStyle != STYLE_INDENTGUIDE) {
|
||||
float fFontSize = fBaseFontSize;
|
||||
Style_StrGetSizeFloatEx(lpszStyle, &fFontSize);
|
||||
SendMessage(hwnd, SCI_STYLESETSIZEFRACTIONAL, iStyle, f2int(fFontSize * SC_FONT_SIZE_MULTIPLIER));
|
||||
}
|
||||
else {
|
||||
float fWidth = 1.0;
|
||||
Style_StrGetSizeFloatEx(lpszStyle, &fWidth);
|
||||
int const width = clampi(f2int(fWidth), 0, 256);
|
||||
SciCall_SetMarginLeft(width);
|
||||
}
|
||||
|
||||
char localeNameA[LOCALE_NAME_MAX_LENGTH] = "en-us\0";
|
||||
#if defined(HAVE_DYN_LOAD_LIBS_MUI_LNGS)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user