Don Ho 5 days ago
parent
commit
467182602a
  1. 4
      PowerEditor/installer/nativeLang/english.xml
  2. 4
      PowerEditor/installer/nativeLang/english_customizable.xml
  3. 4
      PowerEditor/src/Parameters.h
  4. 32
      PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp
  5. 2
      PowerEditor/src/WinControls/TabBar/TabBar.cpp

4
PowerEditor/installer/nativeLang/english.xml

@ -1720,9 +1720,9 @@ Find in all files but exclude all folders log or logs recursively:
<finder-collapse-all value="Fold all"/>
<finder-uncollapse-all value="Unfold all"/>
<finder-copy value="Copy Selected Line(s)"/>
<finder-copy-paths value="Copy Selected Pathname(s)"/>
<finder-copy-selected-paths value="Copy Selected Pathname(s)"/>
<finder-clear-all value="Clear all"/>
<finder-open-all value="Open Selected Pathname(s)"/>
<finder-open-selected-paths value="Open Selected Pathname(s)"/>
<finder-purge-for-every-search value="Purge for every search"/>
<finder-wrap-long-lines value="Word wrap long lines"/>
<common-ok value="OK"/>

4
PowerEditor/installer/nativeLang/english_customizable.xml

@ -1718,9 +1718,9 @@ Find in all files but exclude all folders log or logs recursively:
<finder-collapse-all value="Fold all"/>
<finder-uncollapse-all value="Unfold all"/>
<finder-copy value="Copy Selected Line(s)"/>
<finder-copy-paths value="Copy Selected Pathname(s)"/>
<finder-copy-selected-paths value="Copy Selected Pathname(s)"/>
<finder-clear-all value="Clear all"/>
<finder-open-all value="Open Selected Pathname(s)"/>
<finder-open-selected-paths value="Open Selected Pathname(s)"/>
<finder-purge-for-every-search value="Purge for every search"/>
<finder-wrap-long-lines value="Word wrap long lines"/>
<common-ok value="OK"/>

4
PowerEditor/src/Parameters.h

@ -1396,12 +1396,12 @@ struct HLSColour
void loadFromRGB(COLORREF rgb) { ColorRGBToHLS(rgb, &_hue, &_lightness, &_saturation); }
COLORREF toRGB() const { return ColorHLSToRGB(_hue, _lightness, _saturation); }
COLORREF toRGB4DarkModWithTuning(int lightnessMore, int saturationLess) const {
COLORREF toRGB4DarkModeWithTuning(int lightnessMore, int saturationLess) const {
return ColorHLSToRGB(_hue,
static_cast<WORD>(static_cast<int>(_lightness) + lightnessMore),
static_cast<WORD>(static_cast<int>(_saturation) - saturationLess));
}
COLORREF toRGB4DarkMod() const { return toRGB4DarkModWithTuning(50, 20); }
COLORREF toRGB4DarkMod() const { return toRGB4DarkModeWithTuning(50, 20); }
};
struct UdlXmlFileState final {

32
PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp

@ -703,29 +703,33 @@ vector<wstring> Finder::getResultFilePaths(bool onlyInSelectedText) const
toLine = _scintView.execute(SCI_GETLINECOUNT) - 1;
}
size_t len = _pMainFoundInfos->size(); // First, get the number of elements in the container
for (size_t line = fromLine; line <= toLine; ++line)
{
bool found = false; // Was it found?
const int lineFoldLevel = _scintView.execute(SCI_GETFOLDLEVEL, line) & SC_FOLDLEVELNUMBERMASK;
if (lineFoldLevel == fileHeaderLevel)
{
wstring lineStr = _scintView.getLine(line);
// fileHeaderLevel line format examples:
// spacespaceD:\folder\file.ext (2 hits)
// spacespacenew 1 (1 hit)
const size_t startIndex = 2; // for number of leading spaces
auto endIndex = lineStr.find_last_of(L'(');
--endIndex; // adjust for space in front of (
wstring path = lineStr.substr(startIndex, endIndex - startIndex);
// make sure that path is not already in before adding
if (std::find(paths.begin(), paths.end(), path) == paths.end())
line++; // Move to the next line
if (line < len)
found = true; // Found it
}
else if (lineFoldLevel == resultLevel)
{
if (line < len)
found = true; // Found it
}
if (found)
{
wstring& path = (*_pMainFoundInfos)[line]._fullPath; // Get the path from the container
if (path.find('\\') != std::wstring::npos && std::find(paths.begin(), paths.end(), path) == paths.end()) // Contains a path separator and does not exist in the container
{
paths.push_back(path);
}
}
}
return paths;
}
@ -5736,12 +5740,12 @@ intptr_t CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam
wstring copyLines = pNativeSpeaker->getLocalizedStrFromID("finder-copy", L"Copy Selected Line(s)");
wstring copyVerbatim = pNativeSpeaker->getNativeLangMenuString(IDM_EDIT_COPY, L"Copy", true);
copyVerbatim += L"\tCtrl+C";
wstring copyPaths = pNativeSpeaker->getLocalizedStrFromID("finder-copy-paths", L"Copy Selected Pathname(s)");
wstring copyPaths = pNativeSpeaker->getLocalizedStrFromID("finder-copy-selected-paths", L"Copy Selected Pathname(s)");
wstring selectAll = pNativeSpeaker->getNativeLangMenuString(IDM_EDIT_SELECTALL, L"Select all", true);
selectAll += L"\tCtrl+A";
wstring clearAll = pNativeSpeaker->getLocalizedStrFromID("finder-clear-all", L"Clear all");
wstring purgeForEverySearch = pNativeSpeaker->getLocalizedStrFromID("finder-purge-for-every-search", L"Purge for every search");
wstring openAll = pNativeSpeaker->getLocalizedStrFromID("finder-open-all", L"Open Selected Pathname(s)");
wstring openAll = pNativeSpeaker->getLocalizedStrFromID("finder-open-selected-paths", L"Open Selected Pathname(s)");
wstring wrapLongLines = pNativeSpeaker->getLocalizedStrFromID("finder-wrap-long-lines", L"Word wrap long lines");
tmp.push_back(MenuItemUnit(NPPM_INTERNAL_FINDINFINDERDLG, findInFinder));

2
PowerEditor/src/WinControls/TabBar/TabBar.cpp

@ -1479,7 +1479,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
if (_currentHoverTabItem == nTab && brushColour != colorActiveBg) // hover on a "darker" inactive tab
{
HLSColour hls(brushColour);
brushColour = hls.toRGB4DarkModWithTuning(15, 0); // make it lighter slightly
brushColour = hls.toRGB4DarkModeWithTuning(15, 0); // make it lighter slightly
}
hBrush = ::CreateSolidBrush(brushColour);

Loading…
Cancel
Save