mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-31 01:34:58 +02:00
Fix Find dialog status text too left visual glitch
Text was visible but positioned too left. This visual glitch was accented in Windows 11 due to its rounding-wnd-corners effect. Fix #16359, close #16415
This commit is contained in:
parent
b3b4782848
commit
17cdde3622
@ -4152,7 +4152,7 @@ void FindReplaceDlg::saveInMacro(size_t cmd, int cmdType)
|
|||||||
::SendMessage(_hParent, WM_FRSAVE_INT, IDC_FRCOMMAND_EXEC, cmd);
|
::SendMessage(_hParent, WM_FRSAVE_INT, IDC_FRCOMMAND_EXEC, cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindReplaceDlg::setStatusbarMessage(const wstring & msg, FindStatus staus, const wstring& tooltipMsg)
|
void FindReplaceDlg::setStatusbarMessage(const wstring & msg, FindStatus status, const wstring& tooltipMsg)
|
||||||
{
|
{
|
||||||
if (_statusbarTooltipWnd)
|
if (_statusbarTooltipWnd)
|
||||||
{
|
{
|
||||||
@ -4162,7 +4162,7 @@ void FindReplaceDlg::setStatusbarMessage(const wstring & msg, FindStatus staus,
|
|||||||
|
|
||||||
_statusbarTooltipMsg = tooltipMsg;
|
_statusbarTooltipMsg = tooltipMsg;
|
||||||
|
|
||||||
if (staus == FSNotFound)
|
if (status == FSNotFound)
|
||||||
{
|
{
|
||||||
if (!NppParameters::getInstance().getNppGUI()._muteSounds)
|
if (!NppParameters::getInstance().getNppGUI()._muteSounds)
|
||||||
::MessageBeep(0xFFFFFFFF);
|
::MessageBeep(0xFFFFFFFF);
|
||||||
@ -4175,7 +4175,7 @@ void FindReplaceDlg::setStatusbarMessage(const wstring & msg, FindStatus staus,
|
|||||||
flashInfo.dwFlags = FLASHW_ALL;
|
flashInfo.dwFlags = FLASHW_ALL;
|
||||||
FlashWindowEx(&flashInfo);
|
FlashWindowEx(&flashInfo);
|
||||||
}
|
}
|
||||||
else if (staus == FSTopReached || staus == FSEndReached)
|
else if (status == FSTopReached || status == FSEndReached)
|
||||||
{
|
{
|
||||||
if (!isVisible())
|
if (!isVisible())
|
||||||
{
|
{
|
||||||
@ -4191,10 +4191,19 @@ void FindReplaceDlg::setStatusbarMessage(const wstring & msg, FindStatus staus,
|
|||||||
|
|
||||||
if (isVisible())
|
if (isVisible())
|
||||||
{
|
{
|
||||||
_statusbarFindStatus = staus;
|
_statusbarFindStatus = status;
|
||||||
|
if ((msg.length() > 0) && (msg.at(0) != L' '))
|
||||||
|
{
|
||||||
|
// fix visual glitch (text is visible, but positioned too far to the left)
|
||||||
|
wstring msgSpaceIndented = L' ' + msg;
|
||||||
|
_statusBar.setOwnerDrawText(msgSpaceIndented.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
_statusBar.setOwnerDrawText(msg.c_str());
|
_statusBar.setOwnerDrawText(msg.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FindReplaceDlg::setStatusbarMessageWithRegExprErr(ScintillaEditView* pEditView)
|
void FindReplaceDlg::setStatusbarMessageWithRegExprErr(ScintillaEditView* pEditView)
|
||||||
{
|
{
|
||||||
|
@ -405,7 +405,7 @@ public :
|
|||||||
|
|
||||||
void execSavedCommand(int cmd, uptr_t intValue, const std::wstring& stringValue);
|
void execSavedCommand(int cmd, uptr_t intValue, const std::wstring& stringValue);
|
||||||
void clearMarks(const FindOption& opt);
|
void clearMarks(const FindOption& opt);
|
||||||
void setStatusbarMessage(const std::wstring & msg, FindStatus staus, const std::wstring& tooltipMsg = L"");
|
void setStatusbarMessage(const std::wstring & msg, FindStatus status, const std::wstring& tooltipMsg = L"");
|
||||||
void setStatusbarMessageWithRegExprErr(ScintillaEditView* pEditView);
|
void setStatusbarMessageWithRegExprErr(ScintillaEditView* pEditView);
|
||||||
std::wstring getScopeInfoForStatusBar(FindOption const *pFindOpt) const;
|
std::wstring getScopeInfoForStatusBar(FindOption const *pFindOpt) const;
|
||||||
Finder * createFinder();
|
Finder * createFinder();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user