diff --git a/libIME/DisplayAttributeInfo.h b/libIME/DisplayAttributeInfo.h index b240cfa..55c8299 100644 --- a/libIME/DisplayAttributeInfo.h +++ b/libIME/DisplayAttributeInfo.h @@ -38,31 +38,16 @@ class DisplayAttributeInfo : public ITfDisplayAttributeInfo { return atom_; } - void setTextColor(COLORREF color) { - attrib_.crText.type = TF_CT_COLORREF; - attrib_.crText.cr = color; - } - void setTextColor(int index) { attrib_.crText.type = TF_CT_SYSCOLOR; attrib_.crText.nIndex = index; } - void setBackgroundColor(COLORREF color) { - attrib_.crBk.type = TF_CT_COLORREF; - attrib_.crBk.cr = color; - } - void setBackgroundColor(int index) { attrib_.crBk.type = TF_CT_SYSCOLOR; attrib_.crBk.nIndex = index; } - void setLineColor(COLORREF color) { - attrib_.crLine.type = TF_CT_COLORREF; - attrib_.crLine.cr = color; - } - void setLineColor(int index) { attrib_.crLine.type = TF_CT_SYSCOLOR; attrib_.crLine.nIndex = index; diff --git a/libIME/ImeModule.cpp b/libIME/ImeModule.cpp index c688e6d..5cae524 100644 --- a/libIME/ImeModule.cpp +++ b/libIME/ImeModule.cpp @@ -57,9 +57,9 @@ ImeModule::ImeModule(HMODULE module, const CLSID& textServiceClsid): // regiser default display attributes inputAttrib_ = new DisplayAttributeInfo(g_inputDisplayAttributeGuid); inputAttrib_->setTextColor(COLOR_WINDOWTEXT); + inputAttrib_->setBackgroundColor(COLOR_WINDOW); inputAttrib_->setLineStyle(TF_LS_DOT); inputAttrib_->setLineColor(COLOR_WINDOWTEXT); - inputAttrib_->setBackgroundColor(COLOR_WINDOW); displayAttrInfos_.push_back(inputAttrib_); // convertedAttrib_ = new DisplayAttributeInfo(g_convertedDisplayAttributeGuid); // displayAttrInfos_.push_back(convertedAttrib_);