mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-13 13:22:22 +08:00
cleanup selfdrive/assets (#35241)
* remove unused assets * these are icons * these are images * fix * fix * Revert "remove unused assets" This reverts commit 95d1a800de7e830df15d88e8e329aeadd4548b2f. * move these too
This commit is contained in:
+12
-12
@@ -1,19 +1,19 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file alias="bootstrap-icons.svg">../../third_party/bootstrap/bootstrap-icons.svg</file>
|
||||
<file>img_continue_triangle.svg</file>
|
||||
<file>img_circled_check.svg</file>
|
||||
<file>img_circled_slash.svg</file>
|
||||
<file>img_eye_open.svg</file>
|
||||
<file>img_eye_closed.svg</file>
|
||||
<file>images/button_continue_triangle.svg</file>
|
||||
<file>icons/circled_check.svg</file>
|
||||
<file>icons/circled_slash.svg</file>
|
||||
<file>icons/eye_open.svg</file>
|
||||
<file>icons/eye_closed.svg</file>
|
||||
<file>icons/close.svg</file>
|
||||
<file>offroad/icon_lock_closed.svg</file>
|
||||
<file>offroad/icon_checkmark.svg</file>
|
||||
<file>offroad/icon_warning.png</file>
|
||||
<file>offroad/icon_wifi_strength_low.svg</file>
|
||||
<file>offroad/icon_wifi_strength_medium.svg</file>
|
||||
<file>offroad/icon_wifi_strength_high.svg</file>
|
||||
<file>offroad/icon_wifi_strength_full.svg</file>
|
||||
<file>icons/lock_closed.svg</file>
|
||||
<file>icons/checkmark.svg</file>
|
||||
<file>icons/warning.png</file>
|
||||
<file>icons/wifi_strength_low.svg</file>
|
||||
<file>icons/wifi_strength_medium.svg</file>
|
||||
<file>icons/wifi_strength_high.svg</file>
|
||||
<file>icons/wifi_strength_full.svg</file>
|
||||
|
||||
<file alias="languages.json">../ui/translations/languages.json</file>
|
||||
</qresource>
|
||||
|
||||
@@ -234,12 +234,12 @@ WifiUI::WifiUI(QWidget *parent, WifiManager* wifi) : QWidget(parent), wifi(wifi)
|
||||
|
||||
// load imgs
|
||||
for (const auto &s : {"low", "medium", "high", "full"}) {
|
||||
QPixmap pix(ASSET_PATH + "/offroad/icon_wifi_strength_" + s + ".svg");
|
||||
QPixmap pix(ASSET_PATH + "/icons/wifi_strength_" + s + ".svg");
|
||||
strengths.push_back(pix.scaledToHeight(68, Qt::SmoothTransformation));
|
||||
}
|
||||
lock = QPixmap(ASSET_PATH + "offroad/icon_lock_closed.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation);
|
||||
checkmark = QPixmap(ASSET_PATH + "offroad/icon_checkmark.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation);
|
||||
circled_slash = QPixmap(ASSET_PATH + "img_circled_slash.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation);
|
||||
lock = QPixmap(ASSET_PATH + "icons/lock_closed.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation);
|
||||
checkmark = QPixmap(ASSET_PATH + "icons/checkmark.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation);
|
||||
circled_slash = QPixmap(ASSET_PATH + "icons/circled_slash.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation);
|
||||
|
||||
scanningLabel = new QLabel(tr("Scanning for networks..."));
|
||||
scanningLabel->setStyleSheet("font-size: 65px;");
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#include "selfdrive/ui/ui.h"
|
||||
|
||||
ExperimentalModeButton::ExperimentalModeButton(QWidget *parent) : QPushButton(parent) {
|
||||
chill_pixmap = QPixmap("../assets/img_couch.svg").scaledToWidth(img_width, Qt::SmoothTransformation);
|
||||
experimental_pixmap = QPixmap("../assets/img_experimental_grey.svg").scaledToWidth(img_width, Qt::SmoothTransformation);
|
||||
chill_pixmap = QPixmap("../assets/icons/couch.svg").scaledToWidth(img_width, Qt::SmoothTransformation);
|
||||
experimental_pixmap = QPixmap("../assets/icons/experimental_grey.svg").scaledToWidth(img_width, Qt::SmoothTransformation);
|
||||
|
||||
// go to toggles and expand experimental mode description
|
||||
connect(this, &QPushButton::clicked, [=]() { emit openSettings(2, "ExperimentalMode"); });
|
||||
|
||||
@@ -23,43 +23,43 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
|
||||
"OpenpilotEnabledToggle",
|
||||
tr("Enable openpilot"),
|
||||
tr("Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off."),
|
||||
"../assets/img_chffr_wheel.png",
|
||||
"../assets/icons/chffr_wheel.png",
|
||||
},
|
||||
{
|
||||
"ExperimentalMode",
|
||||
tr("Experimental Mode"),
|
||||
"",
|
||||
"../assets/img_experimental_white.svg",
|
||||
"../assets/icons/experimental_white.svg",
|
||||
},
|
||||
{
|
||||
"DisengageOnAccelerator",
|
||||
tr("Disengage on Accelerator Pedal"),
|
||||
tr("When enabled, pressing the accelerator pedal will disengage openpilot."),
|
||||
"../assets/offroad/icon_disengage_on_accelerator.svg",
|
||||
"../assets/icons/disengage_on_accelerator.svg",
|
||||
},
|
||||
{
|
||||
"IsLdwEnabled",
|
||||
tr("Enable Lane Departure Warnings"),
|
||||
tr("Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h)."),
|
||||
"../assets/offroad/icon_warning.png",
|
||||
"../assets/icons/warning.png",
|
||||
},
|
||||
{
|
||||
"AlwaysOnDM",
|
||||
tr("Always-On Driver Monitoring"),
|
||||
tr("Enable driver monitoring even when openpilot is not engaged."),
|
||||
"../assets/offroad/icon_monitoring.png",
|
||||
"../assets/icons/monitoring.png",
|
||||
},
|
||||
{
|
||||
"RecordFront",
|
||||
tr("Record and Upload Driver Camera"),
|
||||
tr("Upload data from the driver facing camera and help improve the driver monitoring algorithm."),
|
||||
"../assets/offroad/icon_monitoring.png",
|
||||
"../assets/icons/monitoring.png",
|
||||
},
|
||||
{
|
||||
"IsMetric",
|
||||
tr("Use Metric System"),
|
||||
tr("Display speed in km/h instead of mph."),
|
||||
"../assets/offroad/icon_metric.png",
|
||||
"../assets/icons/metric.png",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -69,7 +69,7 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
|
||||
tr("Standard is recommended. In aggressive mode, openpilot will follow lead cars closer and be more aggressive with the gas and brake. "
|
||||
"In relaxed mode openpilot will stay further away from lead cars. On supported cars, you can cycle through these personalities with "
|
||||
"your steering wheel distance button."),
|
||||
"../assets/offroad/icon_speed_limit.png",
|
||||
"../assets/icons/speed_limit.png",
|
||||
longi_button_texts);
|
||||
|
||||
// set up uiState update for personality setting
|
||||
@@ -91,7 +91,7 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
|
||||
}
|
||||
|
||||
// Toggles with confirmation dialogs
|
||||
toggles["ExperimentalMode"]->setActiveIcon("../assets/img_experimental.svg");
|
||||
toggles["ExperimentalMode"]->setActiveIcon("../assets/icons/experimental.svg");
|
||||
toggles["ExperimentalMode"]->setConfirmation(true, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ void drawIcon(QPainter &p, const QPoint ¢er, const QPixmap &img, const QBrus
|
||||
ExperimentalButton::ExperimentalButton(QWidget *parent) : experimental_mode(false), engageable(false), QPushButton(parent) {
|
||||
setFixedSize(btn_size, btn_size);
|
||||
|
||||
engage_img = loadPixmap("../assets/img_chffr_wheel.png", {img_size, img_size});
|
||||
experimental_img = loadPixmap("../assets/img_experimental.svg", {img_size, img_size});
|
||||
engage_img = loadPixmap("../assets/icons/chffr_wheel.png", {img_size, img_size});
|
||||
experimental_img = loadPixmap("../assets/icons/experimental.svg", {img_size, img_size});
|
||||
QObject::connect(this, &QPushButton::clicked, this, &ExperimentalButton::changeMode);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ static const QColor DMON_ENGAGED_COLOR = QColor::fromRgbF(0.1, 0.945, 0.26);
|
||||
static const QColor DMON_DISENGAGED_COLOR = QColor::fromRgbF(0.545, 0.545, 0.545);
|
||||
|
||||
DriverMonitorRenderer::DriverMonitorRenderer() : face_kpts_draw(std::size(DEFAULT_FACE_KPTS_3D)) {
|
||||
dm_img = loadPixmap("../assets/img_driver_face.png", {img_size + 5, img_size + 5});
|
||||
dm_img = loadPixmap("../assets/icons/driver_face.png", {img_size + 5, img_size + 5});
|
||||
}
|
||||
|
||||
void DriverMonitorRenderer::updateState(const UIState &s) {
|
||||
|
||||
@@ -98,7 +98,7 @@ QWidget * Setup::low_voltage() {
|
||||
main_layout->addLayout(inner_layout);
|
||||
|
||||
QLabel *triangle = new QLabel();
|
||||
triangle->setPixmap(QPixmap(ASSET_PATH + "offroad/icon_warning.png"));
|
||||
triangle->setPixmap(QPixmap(ASSET_PATH + "icons/warning.png"));
|
||||
inner_layout->addWidget(triangle, 0, Qt::AlignTop | Qt::AlignLeft);
|
||||
inner_layout->addSpacing(80);
|
||||
|
||||
@@ -159,7 +159,7 @@ QWidget * Setup::getting_started() {
|
||||
vlayout->addStretch();
|
||||
|
||||
QPushButton *btn = new QPushButton();
|
||||
btn->setIcon(QIcon(":/img_continue_triangle.svg"));
|
||||
btn->setIcon(QIcon(":/images/button_continue_triangle.svg"));
|
||||
btn->setIconSize(QSize(54, 106));
|
||||
btn->setFixedSize(310, 1080);
|
||||
btn->setProperty("primary", true);
|
||||
@@ -251,7 +251,7 @@ QWidget * radio_button(QString title, QButtonGroup *group) {
|
||||
)");
|
||||
|
||||
// checkmark icon
|
||||
QPixmap pix(":/img_circled_check.svg");
|
||||
QPixmap pix(":/icons/circled_check.svg");
|
||||
btn->setIcon(pix);
|
||||
btn->setIconSize(QSize(0, 0));
|
||||
btn->setLayoutDirection(Qt::RightToLeft);
|
||||
|
||||
@@ -120,11 +120,11 @@ InputDialog::InputDialog(const QString &title, QWidget *parent, const QString &s
|
||||
eye_btn->setFixedSize(150, 120);
|
||||
QObject::connect(eye_btn, &QPushButton::toggled, [=](bool checked) {
|
||||
if (checked) {
|
||||
eye_btn->setIcon(QIcon(ASSET_PATH + "img_eye_closed.svg"));
|
||||
eye_btn->setIcon(QIcon(ASSET_PATH + "icons/eye_closed.svg"));
|
||||
eye_btn->setIconSize(QSize(81, 54));
|
||||
line->setEchoMode(QLineEdit::Password);
|
||||
} else {
|
||||
eye_btn->setIcon(QIcon(ASSET_PATH + "img_eye_open.svg"));
|
||||
eye_btn->setIcon(QIcon(ASSET_PATH + "icons/eye_open.svg"));
|
||||
eye_btn->setIconSize(QSize(81, 44));
|
||||
line->setEchoMode(QLineEdit::Normal);
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ def clamp(value, min_value, max_value):
|
||||
|
||||
class SpinnerRenderer:
|
||||
def __init__(self):
|
||||
self._comma_texture = gui_app.texture("img_spinner_comma.png", TEXTURE_SIZE, TEXTURE_SIZE)
|
||||
self._spinner_texture = gui_app.texture("img_spinner_track.png", TEXTURE_SIZE, TEXTURE_SIZE, alpha_premultiply=True)
|
||||
self._comma_texture = gui_app.texture("images/spinner_comma.png", TEXTURE_SIZE, TEXTURE_SIZE)
|
||||
self._spinner_texture = gui_app.texture("images/spinner_track.png", TEXTURE_SIZE, TEXTURE_SIZE, alpha_premultiply=True)
|
||||
self._rotation = 0.0
|
||||
self._progress: int | None = None
|
||||
self._wrapped_lines: list[str] = []
|
||||
|
||||
Reference in New Issue
Block a user