mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Enhance "Go to settings": guide users to the related setting explicitly
Fix #16846, close #16847
This commit is contained in:
parent
1582c67b63
commit
f5a34dcc9f
@ -1890,6 +1890,7 @@ If you select advanced mode but do not edit files in the aforementioned language
|
||||
<statusbar-Sel-number value="Sel"/>
|
||||
<toolbar-accent-tip value="This option makes your toolbar icons follow Windows system accent color. Accent color is the highlight color used in buttons, borders, and Start menu tiles in Windows. To change it, go to Settings > Personalization > Colors, then select your preferred accent color."/>
|
||||
<max-len-on-search-tip value="Only 2046 characters are allowed for the find/replace text length - your input could be truncated."/>
|
||||
<goto-setting-tip value="Find your setting here"/>
|
||||
</MiscStrings>
|
||||
</Native-Langue>
|
||||
</NotepadPlus>
|
||||
|
@ -1890,6 +1890,7 @@ If you select advanced mode but do not edit files in the aforementioned language
|
||||
<statusbar-Sel-number value="Sel"/>
|
||||
<toolbar-accent-tip value="This option makes your toolbar icons follow Windows system accent color. Accent color is the highlight color used in buttons, borders, and Start menu tiles in Windows. To change it, go to Settings > Personalization > Colors, then select your preferred accent color."/>
|
||||
<max-len-on-search-tip value="Only 2046 characters are allowed for the find/replace text length - your input could be truncated."/>
|
||||
<goto-setting-tip value="Find your setting here"/>
|
||||
</MiscStrings>
|
||||
</Native-Langue>
|
||||
</NotepadPlus>
|
||||
|
@ -639,7 +639,7 @@ Translation note:
|
||||
<Item id="2230" name="Forcer style gras pour tous les styles"/>
|
||||
<Item id="2231" name="Forcer italique pour tous les styles"/>
|
||||
<Item id="2232" name="Forcer souligné pour tous les styles"/>
|
||||
<Item id="2234" name="Forcera boîte de dialogue Préférences"/>
|
||||
<Item id="2234" name="Accéder au paramètre"/>
|
||||
<!-- Don't translate "Global override" -->
|
||||
<Item id="2235" name="C'est quoi « Global override » ?"/>
|
||||
</SubDialog>
|
||||
@ -1885,6 +1885,7 @@ Si vous sélectionnez le mode avancé sans modifier les fichiers des langues men
|
||||
<statusbar-Sel-number value="Sel"/>
|
||||
<toolbar-accent-tip value="Cette option permet aux icônes de votre barre d'outils d'adopter la couleur d'accentuation du système Windows. La couleur d'accentuation est la couleur de surbrillance utilisée pour les boutons, les bordures et les tuiles du menu Démarrer sous Windows. Pour la modifier, accédez à Paramètres > Personnalisation > Couleurs, puis sélectionnez votre couleur d'accentuation préférée."/>
|
||||
<max-len-on-search-tip value="Seuls 2046 caractères sont autorisés pour la longueur du texte de recherche/remplacement - votre entrée pourrait être tronquée."/>
|
||||
<goto-setting-tip value="Réglage du paramètre ici"/>
|
||||
</MiscStrings>
|
||||
</Native-Langue>
|
||||
</NotepadPlus>
|
||||
|
@ -1709,6 +1709,7 @@ C、C++、Java、C#、Objective-C、PHP、JavaScript、JSP、CSS、Perl、Rust
|
||||
<statusbar-Sel-number value="選取"/>
|
||||
<toolbar-accent-tip value="此選項可讓您的工具列圖示遵循 Windows 系統強調色。強調色是 Windows 中的按鈕、邊框和開始功能表圖塊所使用的反白顯示顏色。要更改它,請轉到「設定」>「個性化」>「顏色」,然後選擇您喜歡的強調色。"/>
|
||||
<max-len-on-search-tip value="尋找/取代文字長度僅允許 2046 個字元 - 您的輸入可能會被截斷。"/>
|
||||
<goto-setting-tip value="相關的偏好設定在此"/>
|
||||
</MiscStrings>
|
||||
</Native-Langue>
|
||||
</NotepadPlus>
|
||||
|
@ -2095,7 +2095,7 @@ bool isCoreWindows()
|
||||
return isCoreWindows;
|
||||
}
|
||||
|
||||
bool ControlInfoTip::init(HINSTANCE hInst, HWND ctrl2attached, HWND ctrl2attachedParent, const wstring& tipStr, bool isRTL)
|
||||
bool ControlInfoTip::init(HINSTANCE hInst, HWND ctrl2attached, HWND ctrl2attachedParent, const wstring& tipStr, bool isRTL, unsigned int remainTimeMillisecond /* = 0 */)
|
||||
{
|
||||
_hWndInfoTip = CreateWindowEx(isRTL ? WS_EX_LAYOUTRTL : 0, TOOLTIPS_CLASS, NULL,
|
||||
WS_POPUP | TTS_ALWAYSTIP | TTS_BALLOON,
|
||||
@ -2121,8 +2121,10 @@ bool ControlInfoTip::init(HINSTANCE hInst, HWND ctrl2attached, HWND ctrl2attache
|
||||
}
|
||||
|
||||
SendMessage(_hWndInfoTip, TTM_SETMAXTIPWIDTH, 0, 200);
|
||||
SendMessage(_hWndInfoTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((15000), (0)));
|
||||
SendMessage(_hWndInfoTip, TTM_ACTIVATE, TRUE, 0); // Activates the tooltip control globally
|
||||
SendMessage(_hWndInfoTip, TTM_ACTIVATE, TRUE, 0);
|
||||
|
||||
if (remainTimeMillisecond)
|
||||
SetTimer(ctrl2attachedParent, IDT_HIDE_TOOLTIP, remainTimeMillisecond, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -298,6 +298,9 @@ bool isWindowVisibleOnAnyMonitor(const RECT& rectWndIn);
|
||||
|
||||
bool isCoreWindows();
|
||||
|
||||
|
||||
#define IDT_HIDE_TOOLTIP 1001
|
||||
|
||||
class ControlInfoTip final
|
||||
{
|
||||
public:
|
||||
@ -307,7 +310,7 @@ public:
|
||||
hide();
|
||||
}
|
||||
};
|
||||
bool init(HINSTANCE hInst, HWND ctrl2attached, HWND ctrl2attachedParent, const std::wstring& tipStr, bool isRTL);
|
||||
bool init(HINSTANCE hInst, HWND ctrl2attached, HWND ctrl2attachedParent, const std::wstring& tipStr, bool isRTL, unsigned int remainTimeMillisecond = 0); // remainTimeMillisecond = 0: no timeout
|
||||
|
||||
bool isValid() const {
|
||||
return _hWndInfoTip != nullptr;
|
||||
|
@ -3126,8 +3126,7 @@ void ScintillaEditView::performGlobalStyles()
|
||||
{
|
||||
caretColor = pStyle->_fgColor;
|
||||
}
|
||||
//execute(SCI_SETCARETFORE, caretColor);
|
||||
setElementColour(SC_ELEMENT_CARET, caretColor); // SCI_SETCARETFORE is deprecated
|
||||
setElementColour(SC_ELEMENT_CARET, caretColor);
|
||||
|
||||
COLORREF multiEditCaretColor = darkGrey;
|
||||
pStyle = stylers.findByName(L"Multi-edit carets color");
|
||||
|
@ -1101,10 +1101,15 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|
||||
result.first = edit1;
|
||||
result.second = IDC_RADIO_CLM_HILITE;
|
||||
}
|
||||
else if (style._styleDesc == L"Multi-edit carets color" || style._styleDesc == L"Multi-selected text color")
|
||||
{
|
||||
result.first = edit2;
|
||||
result.second = IDC_CHECK_MULTISELECTION;
|
||||
}
|
||||
else if (style._styleDesc == L"Caret colour")
|
||||
{
|
||||
result.first = edit1;
|
||||
result.second = IDC_WIDTH_COMBO;
|
||||
result.second = IDC_CARETSETTING_STATIC;
|
||||
}
|
||||
else if (style._styleDesc == L"Edge colour")
|
||||
{
|
||||
@ -1126,12 +1131,12 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|
||||
|| style._styleDesc == L"Change History saved")
|
||||
{
|
||||
result.first = margins;
|
||||
result.second = IDC_CHECK_CHANGHISTORYMARGIN;
|
||||
result.second = IDC_GB_CHANGHISTORY;
|
||||
}
|
||||
else if (style._styleDesc == L"Fold" || style._styleDesc == L"Fold active" || style._styleDesc == L"Fold margin")
|
||||
{
|
||||
result.first = margins;
|
||||
result.second = IDC_RADIO_BOX;
|
||||
result.second = IDC_FMS_GB_STATIC;
|
||||
}
|
||||
else if (style._styleDesc == L"Smart Highlighting")
|
||||
{
|
||||
@ -1152,7 +1157,7 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|
||||
|| style._styleDesc == L"Mark Style 4" || style._styleDesc == L"Mark Style 5")
|
||||
{
|
||||
result.first = highlighting;
|
||||
result.second = IDC_CHECK_MARKALLCASESENSITIVE;
|
||||
result.second = IDC_MARKALL_STATIC;
|
||||
}
|
||||
else if (style._styleDesc == L"URL hovered")
|
||||
{
|
||||
@ -1164,6 +1169,11 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|
||||
result.first = edit2;
|
||||
result.second = IDC_CHECK_WITHCUSTOMCOLOR_CRLF;
|
||||
}
|
||||
else if (style._styleDesc == L"Active tab focused indicator" || style._styleDesc == L"Active tab unfocused indicator")
|
||||
{
|
||||
result.first = tabbar;
|
||||
result.second = IDC_CHECK_ORANGE;
|
||||
}
|
||||
else if (style._styleDesc == L"Inactive tabs")
|
||||
{
|
||||
result.first = tabbar;
|
||||
|
@ -109,8 +109,22 @@ bool PreferenceDlg::goToSection(size_t iPage, intptr_t ctrlID)
|
||||
if (ctrlID != -1)
|
||||
{
|
||||
::SetFocus(::GetDlgItem(_wVector[iPage]._dlg->getHSelf(), int(ctrlID)));
|
||||
}
|
||||
if (_gotoTip.isValid())
|
||||
{
|
||||
_gotoTip.hide();
|
||||
}
|
||||
|
||||
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
||||
static wstring hereTip = pNativeSpeaker->getLocalizedStrFromID("goto-setting-tip", L"Find your setting here");
|
||||
bool isSuccessful = _gotoTip.init(_hInst, ::GetDlgItem(_wVector[iPage]._dlg->getHSelf(), int(ctrlID)), _hSelf, hereTip.c_str(), pNativeSpeaker->isRTL(), 2000);
|
||||
|
||||
if (!isSuccessful)
|
||||
return false;
|
||||
|
||||
NppDarkMode::setDarkTooltips(_gotoTip.getTipHandle(), NppDarkMode::ToolTipsType::tooltip);
|
||||
|
||||
_gotoTip.show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -226,6 +240,29 @@ intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_NCLBUTTONDOWN:
|
||||
{
|
||||
if (_gotoTip.isValid())
|
||||
{
|
||||
_gotoTip.hide();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
case WM_TIMER:
|
||||
{
|
||||
if (wParam == IDT_HIDE_TOOLTIP)
|
||||
{
|
||||
if (_gotoTip.isValid())
|
||||
{
|
||||
_gotoTip.hide();
|
||||
KillTimer(_hSelf, IDT_HIDE_TOOLTIP);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_CTLCOLORLISTBOX:
|
||||
{
|
||||
return NppDarkMode::onCtlColorListbox(wParam, lParam);
|
||||
|
@ -434,5 +434,7 @@ private :
|
||||
CloudAndLinkSubDlg _cloudAndLinkSubDlg;
|
||||
SearchEngineSubDlg _searchEngineSubDlg;
|
||||
SearchingSubDlg _searchingSubDlg;
|
||||
|
||||
ControlInfoTip _gotoTip;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user