Release v0.4.0: add screen capture and annotation editor

This commit is contained in:
2026-10-28 22:15:59 +02:00
parent e5ff9495e4
commit dc615d0223
89 changed files with 2745 additions and 48 deletions
+4 -2
View File
@@ -45,7 +45,7 @@ bool validId(const std::wstring &id)
void validateSettings(const Settings &s)
{
std::vector<Hotkey> used;
std::vector<std::wstring> keys{s.toggle, s.casing, s.translit, s.undo, s.clipboard};
std::vector<std::wstring> keys{s.toggle, s.casing, s.translit, s.undo, s.clipboard, s.screenshot};
keys.insert(keys.end(), s.direct.begin(), s.direct.end());
for (auto &text : keys)
{
@@ -150,6 +150,7 @@ Settings decodeSettings(const Bytes &bytes, const std::vector<Layout> &layouts)
s.translit = str(j, "translitHotkey", s.translit);
s.undo = str(j, "undoHotkey", s.undo);
s.clipboard = str(j, "clipboardHotkey", s.clipboard);
s.screenshot = str(j, "screenshotHotkey", s.screenshot);
if (j.contains("layouts"))
{
s.cycle.clear();
@@ -203,7 +204,8 @@ Bytes encodeSettings(const Settings &s)
{"caseHotkey", utf8(s.casing)},
{"translitHotkey", utf8(s.translit)},
{"undoHotkey", utf8(s.undo)},
{"clipboardHotkey", utf8(s.clipboard)}};
{"clipboardHotkey", utf8(s.clipboard)},
{"screenshotHotkey", utf8(s.screenshot)}};
j["layouts"] = Json::array();
for (auto &id : s.cycle)
j["layouts"].push_back(utf8(id));