mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-14 03:16:38 +10:00
Added option to use a custom search hint
If set, intercepts the search hint's DrawText function and swaps out the default text for user-defined text. Leaving the text blank results in an empty search box.
This commit is contained in:
committed by
Ibuprophen
parent
68379f4098
commit
5399e3ad8c
@@ -444,7 +444,10 @@ LRESULT CALLBACK CMenuContainer::SubclassSearchBox( HWND hWnd, UINT uMsg, WPARAM
|
||||
SetBkColor(hdc,GetSysColor(COLOR_WINDOW));
|
||||
SetBkMode(hdc,TRANSPARENT);
|
||||
SetTextColor(hdc,s_Skin.Search_text_colors[1]);
|
||||
DrawText(hdc,pParent->m_Items[pParent->m_SearchIndex].name,-1,&rc,DT_SINGLELINE|DT_EDITCONTROL|(s_bRTL?DT_RIGHT:DT_LEFT));
|
||||
if (GetSettingBool(L"SearchHint"))
|
||||
DrawText(hdc,GetSettingString(L"SearchHintText"),-1,&rc,DT_SINGLELINE|DT_EDITCONTROL|(s_bRTL?DT_RIGHT:DT_LEFT));
|
||||
else
|
||||
DrawText(hdc,pParent->m_Items[pParent->m_SearchIndex].name,-1,&rc,DT_SINGLELINE|DT_EDITCONTROL|(s_bRTL?DT_RIGHT:DT_LEFT));
|
||||
SelectObject(hdc,font0);
|
||||
}
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user