fix: 修正滑块填充残留、数值内联输入与信号/分组重命名,拖拽虚影跟随鼠标
- 滑块最小值时不再有超出圆钮的填充残留,三处滑块统一为共享实现 - 透明度/RGB/色号支持点击或双击直接输入,整段高亮、首次键入替换、回车提交、Ctrl+C 复制 - 双击信号行或分组名进入重命名编辑;分组竖线改为绘制而非字符 - 拖拽信号时曲线虚影跟随鼠标纵向位移 - 数据层新增展示名覆盖,面板改为持有可写数据集合
This commit is contained in:
1 parent
542aa51e40
commit
261b8ac07d
13 files changed
+1074
-274
No files matched your search
@@ -367,4 +367,48 @@ namespace jdi
|
||||
}
|
||||
}
|
||||
|
||||
bool CopyTextToClipboard(HWND owner, const std::wstring& text)
|
||||
{
|
||||
if (text.empty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (OpenClipboard(owner) == FALSE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
if (EmptyClipboard() != FALSE)
|
||||
{
|
||||
const SIZE_T bytes = (text.size() + 1) * sizeof(wchar_t);
|
||||
HGLOBAL handle = GlobalAlloc(GMEM_MOVEABLE, bytes);
|
||||
if (handle != nullptr)
|
||||
{
|
||||
void* target = GlobalLock(handle);
|
||||
if (target != nullptr)
|
||||
{
|
||||
std::memcpy(target, text.c_str(), bytes);
|
||||
GlobalUnlock(handle);
|
||||
if (SetClipboardData(CF_UNICODETEXT, handle) != nullptr)
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFree(handle);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFree(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CloseClipboard();
|
||||
return success;
|
||||
}
|
||||
|
||||
} // namespace jdi
|
||||
Reference in new issue
Block a user