Skip to content

Commit

Permalink
Support new SC_PRINT_SCREENCOLOURS print option.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jul 8, 2018
1 parent f11797f commit f6b2dce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Notepad2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5282,7 +5282,7 @@ void LoadSettings(void) {
iPrintFooter = clamp_i(iPrintFooter, 0, 1);

iPrintColor = IniSectionGetInt(pIniSection, L"PrintColorMode", 3);
iPrintColor = clamp_i(iPrintColor, 0, 4);
iPrintColor = clamp_i(iPrintColor, 0, 5);

iPrintZoom = IniSectionGetInt(pIniSection, L"PrintZoom", 10) - 10;
iPrintZoom = clamp_i(iPrintZoom, -10, 20);
Expand Down
5 changes: 3 additions & 2 deletions src/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,13 @@ extern "C" BOOL EditPrint(HWND hwnd, LPCWSTR pszDocTitle, LPCWSTR pszPageFormat)
}

// Set print color mode
int printColorModes[5] = {
const int printColorModes[] = {
SC_PRINT_NORMAL,
SC_PRINT_INVERTLIGHT,
SC_PRINT_BLACKONWHITE,
SC_PRINT_COLOURONWHITE,
SC_PRINT_COLOURONWHITEDEFAULTBG
SC_PRINT_COLOURONWHITEDEFAULTBG,
SC_PRINT_SCREENCOLOURS,
};
SendMessage(hwnd, SCI_SETPRINTCOLOURMODE, printColorModes[iPrintColor], 0);

Expand Down

0 comments on commit f6b2dce

Please sign in to comment.