Skip to content

Commit

Permalink
Dashboard indicators fixes end
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaRogachev committed Feb 27, 2019
1 parent 91933d9 commit 2b4b599
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 32 deletions.
7 changes: 3 additions & 4 deletions sources/presentation/common/gui_style/gui_style_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,15 @@ GuiStyleManager::~GuiStyleManager()

void GuiStyleManager::setPaletteStyle(PaletteStyle paletteStyle)
{
m_configurator->setPrimaryColor("#01c5a5");
m_configurator->setOnPrimaryColor("#000000");

switch (paletteStyle) {
case Day:
m_configurator->setPrimaryColor("#00c98f");
m_configurator->setOnPrimaryColor("#202020");
m_configurator->setBaseColor("#F5F5F5");
m_configurator->setOnBaseColor("#F5F5F5");
break;
case Night:
m_configurator->setPrimaryColor("#02eec8");
m_configurator->setOnPrimaryColor("#000000");
m_configurator->setBaseColor("#2d373e");
m_configurator->setOnBaseColor("#ffffff");
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Controls.ComboBox {
font.pixelSize: industrial.auxFontSize
font.bold: true
displayText: processingText
contentColor: status == Command.Idle ? industrial.colors.onSurface: industrial.colors.onSelection
contentColor: status == Command.Idle ? industrial.colors.onSurface: industrial.colors.onHighlight
labelColor: status == Command.Idle ? industrial.colors.onSurface: industrial.colors.onHighlight

onActivated: presenter.executeCommand(model[index].command, [])
onStatusChanged: if (status == Command.Completed || status == Command.Rejected) timer.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ Controls.ComboBox {
if (status != Command.Idle) return industrial.colors.surface;
return industrial.colors.onSurface;
}
labelColor: status == Command.Idle ? industrial.colors.onSurface : industrial.colors.onHighlight
currentIndex: {
for (var i = 0; i < model.length; ++i) {
if (mode == model[i]) return i; // works only with ==
}
return -1;
}
labelColor: {
if (status == Command.Idle) {
return control.activeFocus ? industrial.colors.highlight :
industrial.colors.onBackground
}
return industrial.colors.onSelection;
}
backgroundColor: {
switch (status) {
case Command.Rejected: return Indicators.Theme.dangerColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Controls.ComboBox {
labelText: qsTr("Waypoint")
font.pixelSize: industrial.auxFontSize
font.bold: true
contentColor: status == Command.Idle ? industrial.colors.onSurface: industrial.colors.onSelection
contentColor: status == Command.Idle ? industrial.colors.onSurface: industrial.colors.selection
labelColor: status == Command.Idle ? industrial.colors.onSurface: industrial.colors.onHighlight
backgroundColor: {
if (status == Command.Rejected) return Indicators.Theme.dangerColor;
if (status == Command.Sending) return Indicators.Theme.cautionColor;
Expand Down
2 changes: 1 addition & 1 deletion sources/presentation/qml/Drawer/Logs/LogView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RowLayout {
switch (msg.urgency) {
case Notification.Common: return industrial.colors.onSurface;
case Notification.Positive: return industrial.colors.positive;
case Notification.Warning: return industrial.colors.caution;
case Notification.Warning: return industrial.colors.neutral;
case Notification.Critical: return industrial.colors.negative;
default:
return industrial.colors.background;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@ MapItemView {
presenter.navTo(vehicleId, coordinate.latitude, coordinate.longitude,
targetPosition.altitude - homePosition.altitude);
}
onHolded: popup.open()
// onHolded: popup.open()

Controls.Popup {
id: popup
y: pointView.height
closePolicy: Controls.Popup.CloseOnEscape | Controls.Popup.CloseOnPressOutsideParent
// Controls.Popup {
// id: popup
// y: pointView.height
// closePolicy: Controls.Popup.CloseOnEscape | Controls.Popup.CloseOnPressOutsideParent

SetPoint {
title: qsTr("Nav to") + " " + vehicleName
onVisibleChanged: {
if (!visible) return;
// SetPoint {
// title: qsTr("Nav to") + " " + vehicleName
// onVisibleChanged: {
// if (!visible) return;

latitude = targetPosition.latitude;
longitude = targetPosition.longitude;
altitude = targetPosition.altitude - homePosition.altitude;
}
onSetPoint: presenter.navTo(vehicleId, latitude, longitude, altitude);
}
}
// latitude = targetPosition.latitude;
// longitude = targetPosition.longitude;
// altitude = targetPosition.altitude - homePosition.altitude;
// }
// onSetPoint: presenter.navTo(vehicleId, latitude, longitude, altitude);
// }
// }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TopbarButton {
case Notification.Positive:
return industrial.colors.positive;
case Notification.Warning:
return industrial.colors.caution;
return industrial.colors.neutral;
case Notification.Critical:
return industrial.colors.negative;
case Notification.Common:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Controls.Frame {
case Notification.Positive:
return industrial.colors.positive;
case Notification.Warning:
return industrial.colors.caution;
return industrial.colors.neutral;
case Notification.Critical:
return industrial.colors.negative;
case Notification.Common:
Expand Down

0 comments on commit 2b4b599

Please sign in to comment.