From cc551fe24bf62e1825b36b1b9d37df34e84b0188 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sat, 22 Jul 2023 02:51:25 +0800 Subject: [PATCH] ui/MapSettings: remove function `shorten` (#29078) --- selfdrive/ui/qt/maps/map_settings.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/selfdrive/ui/qt/maps/map_settings.cc b/selfdrive/ui/qt/maps/map_settings.cc index 7203d90bf2..104b9d400d 100644 --- a/selfdrive/ui/qt/maps/map_settings.cc +++ b/selfdrive/ui/qt/maps/map_settings.cc @@ -7,10 +7,6 @@ #include "selfdrive/ui/qt/request_repeater.h" #include "selfdrive/ui/qt/widgets/scrollview.h" -static QString shorten(const QString &str, int max_len) { - return str.size() > max_len ? str.left(max_len).trimmed() + "…" : str; -} - MapSettings::MapSettings(bool closeable, QWidget *parent) : QFrame(parent) { close_icon = loadPixmap("../assets/icons/close.svg", {100, 100}); setContentsMargins(0, 0, 0, 0); @@ -253,9 +249,8 @@ void DestinationWidget::set(const QJsonObject &destination, bool current) { icon->setPixmap(icon_pixmap); - // TODO: onroad and offroad have different dimensions - title->setText(shorten(title_text, 26)); - subtitle->setText(shorten(subtitle_text, 26)); + title->setText(title_text); + subtitle->setText(subtitle_text); subtitle->setVisible(true); // TODO: use pixmap