Apply darkmode on missing preference dialog items
- Edit control in Date Time for Custom format - Tooltip in Delimiter for Word character list - Fix blurry text in Link for Clickable Link Settings Fix #11497, close #11498pull/11509/head
parent
46ce9c31df
commit
b88e2fe57f
|
@ -1725,4 +1725,22 @@ namespace NppDarkMode
|
|||
::SetBkColor(hdc, NppDarkMode::getErrorBackgroundColor());
|
||||
return reinterpret_cast<LRESULT>(NppDarkMode::getErrorBackgroundBrush());
|
||||
}
|
||||
|
||||
LRESULT onCtlColorDarkerBGStaticText(HDC hdc, bool isTextEnabled)
|
||||
{
|
||||
LRESULT result = FALSE;
|
||||
|
||||
if (NppDarkMode::isEnabled())
|
||||
{
|
||||
::SetTextColor(hdc, isTextEnabled ? NppDarkMode::getTextColor() : NppDarkMode::getDisabledTextColor());
|
||||
::SetBkColor(hdc, NppDarkMode::getDarkerBackgroundColor());
|
||||
result = reinterpret_cast<LRESULT>(NppDarkMode::getDarkerBackgroundBrush());
|
||||
}
|
||||
else
|
||||
{
|
||||
::SetTextColor(hdc, ::GetSysColor(isTextEnabled ? COLOR_WINDOWTEXT : COLOR_GRAYTEXT));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,4 +169,5 @@ namespace NppDarkMode
|
|||
LRESULT onCtlColorSofter(HDC hdc);
|
||||
LRESULT onCtlColorDarker(HDC hdc);
|
||||
LRESULT onCtlColorError(HDC hdc);
|
||||
LRESULT onCtlColorDarkerBGStaticText(HDC hdc, bool isTextEnabled);
|
||||
}
|
||||
|
|
|
@ -3988,6 +3988,15 @@ intptr_t CALLBACK MultiInstanceSubDlg::run_dlgProc(UINT message, WPARAM wParam,
|
|||
}
|
||||
break;
|
||||
|
||||
case WM_CTLCOLOREDIT:
|
||||
{
|
||||
if (NppDarkMode::isEnabled())
|
||||
{
|
||||
return NppDarkMode::onCtlColorSofter(reinterpret_cast<HDC>(wParam));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_CTLCOLORDLG:
|
||||
case WM_CTLCOLORSTATIC:
|
||||
{
|
||||
|
@ -4245,6 +4254,11 @@ intptr_t CALLBACK DelimiterSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
|
|||
|
||||
case WM_CTLCOLOREDIT:
|
||||
{
|
||||
if (_tip)
|
||||
{
|
||||
NppDarkMode::setDarkTooltips(_tip, NppDarkMode::ToolTipsType::tooltip);
|
||||
}
|
||||
|
||||
if (NppDarkMode::isEnabled())
|
||||
{
|
||||
return NppDarkMode::onCtlColorSofter(reinterpret_cast<HDC>(wParam));
|
||||
|
@ -4379,7 +4393,7 @@ intptr_t CALLBACK DelimiterSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
intptr_t CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
|
||||
intptr_t CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
NppParameters& nppParams = NppParameters::getInstance();
|
||||
NppGUI & nppGUI = nppParams.getNppGUI();
|
||||
|
@ -4467,7 +4481,6 @@ intptr_t CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, L
|
|||
::SendDlgItemMessage(_hSelf, IDC_CHECK_CLICKABLELINK_FULLBOXMODE, BM_SETCHECK, roundBoxMode, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_CLICKABLELINK_NOUNDERLINE), linkEnable);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_CLICKABLELINK_FULLBOXMODE), linkEnable);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_URISCHEMES_STATIC), linkEnable);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_URISCHEMES_EDIT), linkEnable);
|
||||
}
|
||||
break;
|
||||
|
@ -4482,7 +4495,6 @@ intptr_t CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, L
|
|||
}
|
||||
|
||||
case WM_CTLCOLORDLG:
|
||||
case WM_CTLCOLORSTATIC:
|
||||
{
|
||||
if (NppDarkMode::isEnabled())
|
||||
{
|
||||
|
@ -4491,6 +4503,12 @@ intptr_t CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, L
|
|||
break;
|
||||
}
|
||||
|
||||
case WM_CTLCOLORSTATIC:
|
||||
{
|
||||
bool isTextEnabled = isCheckedOrNot(IDC_CHECK_CLICKABLELINK_ENABLE) && ::GetDlgCtrlID(reinterpret_cast<HWND>(lParam)) == IDC_URISCHEMES_STATIC;
|
||||
return NppDarkMode::onCtlColorDarkerBGStaticText(reinterpret_cast<HDC>(wParam), isTextEnabled);
|
||||
}
|
||||
|
||||
case WM_PRINTCLIENT:
|
||||
{
|
||||
if (NppDarkMode::isEnabled())
|
||||
|
@ -4551,9 +4569,10 @@ intptr_t CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, L
|
|||
}
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_CLICKABLELINK_NOUNDERLINE), isChecked);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_CLICKABLELINK_FULLBOXMODE), isChecked);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_URISCHEMES_STATIC), isChecked);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_URISCHEMES_EDIT), isChecked);
|
||||
|
||||
redraw();
|
||||
|
||||
nppGUI._styleURL = isChecked ? urlUnderLineFg : urlDisable;
|
||||
HWND grandParent = ::GetParent(_hParent);
|
||||
::SendMessage(grandParent, NPPM_INTERNAL_UPDATECLICKABLELINKS, 0, 0);
|
||||
|
|
Loading…
Reference in New Issue