diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml index d94b25923..b13244607 100644 --- a/PowerEditor/installer/nativeLang/english.xml +++ b/PowerEditor/installer/nativeLang/english.xml @@ -1890,6 +1890,7 @@ If you select advanced mode but do not edit files in the aforementioned language + diff --git a/PowerEditor/installer/nativeLang/english_customizable.xml b/PowerEditor/installer/nativeLang/english_customizable.xml index da88ad654..d8eef206f 100644 --- a/PowerEditor/installer/nativeLang/english_customizable.xml +++ b/PowerEditor/installer/nativeLang/english_customizable.xml @@ -1890,6 +1890,7 @@ If you select advanced mode but do not edit files in the aforementioned language + diff --git a/PowerEditor/installer/nativeLang/french.xml b/PowerEditor/installer/nativeLang/french.xml index 389dda47d..5bcf93ea0 100644 --- a/PowerEditor/installer/nativeLang/french.xml +++ b/PowerEditor/installer/nativeLang/french.xml @@ -639,7 +639,7 @@ Translation note: - + @@ -1885,6 +1885,7 @@ Si vous sélectionnez le mode avancé sans modifier les fichiers des langues men + diff --git a/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml b/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml index b2fe5796e..f7cc9b95e 100644 --- a/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml +++ b/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml @@ -1709,6 +1709,7 @@ C、C++、Java、C#、Objective-C、PHP、JavaScript、JSP、CSS、Perl、Rust + diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index d8dba7c05..1e7fe1274 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/PowerEditor/src/MISC/Common/Common.cpp @@ -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; } diff --git a/PowerEditor/src/MISC/Common/Common.h b/PowerEditor/src/MISC/Common/Common.h index 7b7103b0a..47395796b 100644 --- a/PowerEditor/src/MISC/Common/Common.h +++ b/PowerEditor/src/MISC/Common/Common.h @@ -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; diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index 8ecfbd00a..951813e85 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -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"); diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp index c6b580267..09b5c552b 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp @@ -1101,10 +1101,15 @@ std::pair 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 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 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 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; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 53f3d2cd5..e6210d8bc 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -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); diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.h b/PowerEditor/src/WinControls/Preference/preferenceDlg.h index 9b7ad17ab..2f3e4d9ba 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.h +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.h @@ -434,5 +434,7 @@ private : CloudAndLinkSubDlg _cloudAndLinkSubDlg; SearchEngineSubDlg _searchEngineSubDlg; SearchingSubDlg _searchingSubDlg; + + ControlInfoTip _gotoTip; };