From f6822f17a95a2da4bf02717854c0c07047d601bb Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 18 Jun 2019 12:43:45 -0700 Subject: [PATCH] Add computer description --- .../simplifiedUI/settingsApp/about/About.qml | 46 +++++++++++++++++-- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml index 6c1f4a3b57..76ab762a6b 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml @@ -47,8 +47,8 @@ Flickable { source: "images/logo.png" Layout.alignment: Qt.AlignHCenter Layout.topMargin: 16 - Layout.preferredWidth: 240 - Layout.preferredHeight: 180 + Layout.preferredWidth: 200 + Layout.preferredHeight: 150 fillMode: Image.PreserveAspectFit mipmap: true } @@ -72,11 +72,35 @@ Flickable { HifiStylesUit.GraphikSemiBold { text: "Platform Info" Layout.maximumWidth: parent.width - Layout.topMargin: 24 - Layout.bottomMargin: 14 + Layout.topMargin: 8 + Layout.bottomMargin: 8 height: paintedHeight size: 22 color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "Computer Vendor/Model:" + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + + Component.onCompleted: { + var computer = JSON.parse(PlatformInfo.getComputer()); + var computerVendor = computer.vendor; + if (computerVendor.length === 0) { + computerVendor = "Unknown"; + } + var computerModel = computer.model; + if (computerModel.length === 0) { + computerModel = "Unknown"; + } + + text = "Computer Vendor/Model: " + computerVendor + "/" + computerModel; + } } HifiStylesUit.GraphikRegular { @@ -152,7 +176,7 @@ Flickable { } SimplifiedControls.Button { - Layout.topMargin: 24 + Layout.topMargin: 8 width: 200 height: 32 text: "Copy to Clipboard" @@ -168,6 +192,18 @@ Flickable { var textToCopy = "**About Interface**\n"; textToCopy += "Interface Version: " + Window.checkVersion() + "\n"; textToCopy += "\n**Platform Info**\n"; + + var computer = JSON.parse(PlatformInfo.getComputer()); + var computerVendor = computer.vendor; + if (computerVendor.length === 0) { + computerVendor = "Unknown"; + } + var computerModel = computer.model; + if (computerModel.length === 0) { + computerModel = "Unknown"; + } + + textToCopy += "Computer Vendor/Model: " + computerVendor + "/" + computerModel + "\n"; textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n"; textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n"; textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n";