From 730d5d09fc38c5c92cc5f862c043e604448dc929 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 18 Nov 2014 15:12:50 +0000 Subject: fix for text underlining in SpellChecker git-svn-id: http://svn.miranda-ng.org/main/trunk@11012 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SpellChecker/src/Version.h | 14 +++++++------- plugins/SpellChecker/src/utils.cpp | 10 ++++++++-- 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'plugins/SpellChecker/src') diff --git a/plugins/SpellChecker/src/Version.h b/plugins/SpellChecker/src/Version.h index c7e688acf0..332b26758c 100644 --- a/plugins/SpellChecker/src/Version.h +++ b/plugins/SpellChecker/src/Version.h @@ -1,14 +1,14 @@ -#define __MAJOR_VERSION 0 -#define __MINOR_VERSION 2 -#define __RELEASE_NUM 6 -#define __BUILD_NUM 1 +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 2 +#define __RELEASE_NUM 6 +#define __BUILD_NUM 2 #include #define __PLUGIN_NAME "Spell checker" -#define __FILENAME "SpellChecker.dll" +#define __FILENAME "SpellChecker.dll" #define __DESCRIPTION "Spell checker for the message windows. Uses Hunspell to do the checking." -#define __AUTHOR "Ricardo Pescuma Domenecci, FREAK_THEMIGHTY" -#define __AUTHOREMAIL "pescuma@miranda-im.org" +#define __AUTHOR "Ricardo Pescuma Domenecci, FREAK_THEMIGHTY" +#define __AUTHOREMAIL "pescuma@miranda-im.org" #define __AUTHORWEB "http://miranda-ng.org/p/SpellChecker/" #define __COPYRIGHT "© 2006-2010 Ricardo Pescuma Domenecci" diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 6661274c21..77358aba0f 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -25,15 +25,21 @@ typedef map DialogMapType; DialogMapType dialogs; DialogMapType menus; +struct CHARFORMAT5 : public CHARFORMAT2 +{ + BYTE bUnderlineColor; +}; + void SetUnderline(Dialog *dlg, int pos_start, int pos_end) { dlg->re->SetSel(pos_start, pos_end); - CHARFORMAT2 cf; + CHARFORMAT5 cf; cf.cbSize = sizeof(CHARFORMAT2); cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; cf.dwEffects = CFE_UNDERLINE; - cf.bUnderlineType = ((opts.underline_type + CFU_UNDERLINEDOUBLE) | 0x50); + cf.bUnderlineType = opts.underline_type + CFU_UNDERLINEDOUBLE; + cf.bUnderlineColor = 0x05; dlg->re->SendMessage(EM_SETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&cf); dlg->markedSomeWord = TRUE; -- cgit v1.2.3