mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Added Dialog.GenerateClipboardText to fix About version info copy
This commit is contained in:
parent
34c6ca9a1a
commit
cd3052e418
2 changed files with 15 additions and 14 deletions
|
@ -322,6 +322,11 @@ namespace Beefy.widgets
|
|||
mDefaultButton.MouseClicked(0, 0, 0, 0, 3);
|
||||
}
|
||||
|
||||
public virtual void GenerateClipboardText(String outText)
|
||||
{
|
||||
outText.AppendF("{}\n{}", mTitle, mText);
|
||||
}
|
||||
|
||||
void WindowKeyDown(KeyDownEvent evt)
|
||||
{
|
||||
if ((evt.mKeyCode != .Alt) && (mWidgetWindow.IsKeyDown(.Alt)) && (!mWidgetWindow.IsKeyDown(.Control)))
|
||||
|
@ -402,10 +407,12 @@ namespace Beefy.widgets
|
|||
}
|
||||
}
|
||||
|
||||
var clipboardText = scope String();
|
||||
clipboardText.AppendF("{}\n{}", mTitle, mText);
|
||||
BFApp.sApp.SetClipboardText(clipboardText, "");
|
||||
evt.mHandled = true;
|
||||
var clipboardText = GenerateClipboardText(.. scope String());
|
||||
if (!clipboardText.IsEmpty)
|
||||
{
|
||||
BFApp.sApp.SetClipboardText(clipboardText, "");
|
||||
evt.mHandled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue