mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 18:18: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,8 +407,9 @@ namespace Beefy.widgets
|
|||
}
|
||||
}
|
||||
|
||||
var clipboardText = scope String();
|
||||
clipboardText.AppendF("{}\n{}", mTitle, mText);
|
||||
var clipboardText = GenerateClipboardText(.. scope String());
|
||||
if (!clipboardText.IsEmpty)
|
||||
{
|
||||
BFApp.sApp.SetClipboardText(clipboardText, "");
|
||||
evt.mHandled = true;
|
||||
}
|
||||
|
@ -411,3 +417,4 @@ namespace Beefy.widgets
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,17 +238,11 @@ namespace IDE.ui
|
|||
MarkDirty();
|
||||
}
|
||||
|
||||
public override void KeyDown(KeyCode keyCode, bool isRepeat)
|
||||
{
|
||||
base.KeyDown(keyCode, isRepeat);
|
||||
|
||||
if ((keyCode == (.)'C') && (mWidgetWindow.GetKeyFlags(true) == .Ctrl))
|
||||
public override void GenerateClipboardText(String outText)
|
||||
{
|
||||
String versionInfo = scope String();
|
||||
versionInfo.AppendF("Beef IDE Version {}", gApp.mVersionInfo.FileVersion);
|
||||
versionInfo.AppendF(" Build {}", gApp.mVersionInfo.ProductVersion);
|
||||
gApp.SetClipboardText(versionInfo);
|
||||
}
|
||||
outText.AppendF("Beef IDE Version {}", gApp.mVersionInfo.FileVersion);
|
||||
outText.AppendF(" Build {}", gApp.mVersionInfo.ProductVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue