From a9790cc158955cb6774e662432bddcbd66274130 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Fri, 3 Jan 2020 17:41:32 -0500 Subject: Rework to raise navigation app and improve behavior Add callback to raise navigation app via homescreen and hook it up to the "Go" button handling. Additionally, testing of this addition revealed that the result list and information panel state is fragile and easily gotten into a bad state with respect to repaints when raising the navigation app. To fix this, the code has been reworked to change InfoPanel into an actual widget and keep it and the result list widget around; manipulating their visibilty rather than recreating them and forcing whole-window repaints. As well, a slight delay is used before raising the navigation app to let all repaints finish. Ideally this would not be required, but the app likely needs a more significant rewrite to fix it. Bug-AGL: SPEC-3079 Signed-off-by: Scott Murray Change-Id: Id8dce33e2a2135179644305a88b340ecd1d7d3c5 --- InfoPanelLabel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'InfoPanelLabel.cpp') diff --git a/InfoPanelLabel.cpp b/InfoPanelLabel.cpp index c87e7e5..1dd5dda 100644 --- a/InfoPanelLabel.cpp +++ b/InfoPanelLabel.cpp @@ -13,7 +13,7 @@ void InfoPanelLabel::Init(int pos, int height, const QString &text, QFont *font) setFont(*font); } setStyleSheet("QLabel { background-color : white; color : #FFFFFF; }"); - setGeometry(QRect(rect.x(), rect.y()+pos, rect.width(), height)); + setGeometry(QRect(0, pos, rect.width(), height)); /* if text is too big, align left so that we can at least read the beginning : */ if (this->text().length() > 0 && this->fontMetrics().width(this->text()) >= rect.width()) -- cgit 1.2.3-korg