Separate version hash from version number in editor and project manager

When copy-pasting the version from About dialog to bug reports at GitHub,
this makes the version hash linkable to commits at GitHub.

(cherry picked from commit 293550f56a)
This commit is contained in:
Andrii Doroshenko (Xrayez) 2021-06-08 00:51:18 +03:00 committed by Rémi Verschelde
parent 915865b279
commit 6f63b0c9ae
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 3 additions and 3 deletions

View file

@ -146,7 +146,7 @@ EditorAbout::EditorAbout() {
version_btn = memnew(LinkButton);
String hash = String(VERSION_HASH);
if (hash.length() != 0) {
hash = "." + hash.left(9);
hash = " " + vformat("[%s]", hash.left(9));
}
version_btn->set_text(VERSION_FULL_NAME + hash);
// Set the text to copy in metadata as it slightly differs from the button's text.

View file

@ -6796,7 +6796,7 @@ EditorNode::EditorNode() {
version_btn->set_text(VERSION_FULL_CONFIG);
String hash = String(VERSION_HASH);
if (hash.length() != 0) {
hash = "." + hash.left(9);
hash = " " + vformat("[%s]", hash.left(9));
}
// Set the text to copy in metadata as it slightly differs from the button's text.
version_btn->set_meta(META_TEXT_TO_COPY, "v" VERSION_FULL_BUILD + hash);

View file

@ -2673,7 +2673,7 @@ ProjectManager::ProjectManager() {
version_btn = memnew(LinkButton);
String hash = String(VERSION_HASH);
if (hash.length() != 0) {
hash = "." + hash.left(9);
hash = " " + vformat("[%s]", hash.left(9));
}
version_btn->set_text("v" VERSION_FULL_BUILD + hash);
// Fade the version label to be less prominent, but still readable.