From 3d05256a363560d1a560a81104e2cf1c5933510f Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Sat, 25 Feb 2012 17:22:08 +1000 Subject: [PATCH 1/2] Welcome page UI tweaks To make it closer to proposed design. * Aligned the background OP logo to the bottom-right corner * Don't upscale the OP logo * Fixed width of community panel * Changed the vertical layout of icons and community panel * Fixed color of community panel titles * Use styled text for next containing &, this fixes rendering but "..." are not displayed --- .../plugins/welcome/qml/CommunityPanel.qml | 4 +-- .../src/plugins/welcome/qml/NewsPanel.qml | 8 +++--- .../src/plugins/welcome/qml/SitesPanel.qml | 4 +-- .../src/plugins/welcome/qml/main.qml | 26 ++++++++++++++----- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/CommunityPanel.qml b/ground/openpilotgcs/src/plugins/welcome/qml/CommunityPanel.qml index a9c3a17c4..60cdfb1ed 100644 --- a/ground/openpilotgcs/src/plugins/welcome/qml/CommunityPanel.qml +++ b/ground/openpilotgcs/src/plugins/welcome/qml/CommunityPanel.qml @@ -2,7 +2,7 @@ import QtQuick 1.1 Item { - width: 600 + width: background.sourceSize.width height: 300 BorderImage { @@ -32,7 +32,7 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.left: newsPanel.right anchors.margins: 16 - color: "#A0A0B0" + color: "#A0A0A0" } SitesPanel { diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml b/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml index d86311549..a0e33c647 100644 --- a/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml +++ b/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml @@ -12,7 +12,7 @@ Item { id: header text: "Project News" width: parent.width - color: "#303060" + color: "#44515c" font { pointSize: 14 weight: Font.Bold @@ -50,16 +50,18 @@ Item { Text { text: title width: view.width + textFormat: text.indexOf("&") > 0 ? Text.StyledText : Text.PlainText elide: Text.ElideRight font.bold: true - color: mouseArea.containsMouse ? "darkblue" : "black" + color: mouseArea.containsMouse ? "#224d81" : "black" } Text { text: description width: view.width + textFormat: text.indexOf("&") > 0 ? Text.StyledText : Text.PlainText elide: Text.ElideRight - color: mouseArea.containsMouse ? "darkblue" : "black" + color: mouseArea.containsMouse ? "#224d81" : "black" } } diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/SitesPanel.qml b/ground/openpilotgcs/src/plugins/welcome/qml/SitesPanel.qml index d8ac28117..a41ef83d5 100644 --- a/ground/openpilotgcs/src/plugins/welcome/qml/SitesPanel.qml +++ b/ground/openpilotgcs/src/plugins/welcome/qml/SitesPanel.qml @@ -12,7 +12,7 @@ Item { id: header text: "OpenPilot Websites" width: parent.width - color: "#303060" + color: "#44515c" font { pointSize: 14 weight: Font.Bold @@ -47,7 +47,7 @@ Item { weight: Font.Bold } - color: mouseArea.containsMouse ? "darkblue" : "black" + color: mouseArea.containsMouse ? "#224d81" : "black" MouseArea { id: mouseArea diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/main.qml b/ground/openpilotgcs/src/plugins/welcome/qml/main.qml index 07c9a812c..764ce36a5 100644 --- a/ground/openpilotgcs/src/plugins/welcome/qml/main.qml +++ b/ground/openpilotgcs/src/plugins/welcome/qml/main.qml @@ -1,6 +1,7 @@ import QtQuick 1.1 Rectangle { + id: container width: 1024 height: 768 @@ -9,30 +10,43 @@ Rectangle { Image { id: bg source: "images/welcome-op-bg.png" - anchors.fill: parent - fillMode: Image.PreserveAspectFit + anchors.bottom: parent.bottom + anchors.right: parent.right + + // The background OP logo is downscalled to fit the page + // but not upscalled if page is larger + property real scale: Math.min(parent.width/sourceSize.width, + parent.height/sourceSize.height, + 1.0) + + width: scale*sourceSize.width + height: scale*sourceSize.height smooth: true } Column { - anchors.centerIn: parent + anchors.horizontalCenter: parent.horizontalCenter + // distribute a vertical space between the icons blocks an community widget as: + // top - 48% - Icons - 27% - CommunityWidget - 25% - bottom + y: (parent.height - buttons.height - communityPanel.height) * 0.48 width: parent.width - spacing: 32 + spacing: (parent.height - buttons.height - communityPanel.height) * 0.27 Row { - //anchors.bottom: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter spacing: 16 Image { source: "images/welcome-op-logo.png" anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -2 //it looks better aligned to icons grid } Grid { id: buttons columns: 3 spacing: 4 + anchors.verticalCenter: parent.verticalCenter WelcomePageButton { baseIconName: "flightdata" @@ -73,8 +87,8 @@ Rectangle { } // images row CommunityPanel { + id: communityPanel anchors.horizontalCenter: parent.horizontalCenter - width: parent.width*0.8 } } } From d38a173bedc6ac660a70eb84d70485f7e1e5fe34 Mon Sep 17 00:00:00 2001 From: David Ankers Date: Sun, 26 Feb 2012 16:40:08 +1100 Subject: [PATCH 2/2] Bug: Spinbox for PitchRateKp was linked to the wrong UAVObject --- .../openpilotgcs/src/plugins/config/stabilization.ui | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/stabilization.ui b/ground/openpilotgcs/src/plugins/config/stabilization.ui index d3c91c78f..106b0da37 100755 --- a/ground/openpilotgcs/src/plugins/config/stabilization.ui +++ b/ground/openpilotgcs/src/plugins/config/stabilization.ui @@ -495,7 +495,7 @@ 0 - -162 + 0 648 802 @@ -3459,7 +3459,7 @@ border-radius: 5; - + 0 @@ -3503,7 +3503,7 @@ border-radius: 5; - + 43 @@ -3525,7 +3525,7 @@ border-radius: 5; objname:StabilizationSettings - fieldname:RollRatePID + fieldname:PitchRatePID element:Kp haslimits:yes scale:0.0001 @@ -11753,8 +11753,8 @@ border-radius: 4; 0 - -350 - 648 + 0 + 401 990