fix font weights in qt ui

old-commit-hash: d75ff15048
commatwo_master
Adeeb Shihadeh 4 years ago
parent 9168fa6d93
commit 10bf2690f1
  1. 3
      selfdrive/assets/fonts/inter.ttf
  2. 4
      selfdrive/ui/qt/home.cc
  3. 5
      selfdrive/ui/qt/offroad/onboarding.cc
  4. 4
      selfdrive/ui/qt/offroad/settings.cc
  5. 3
      selfdrive/ui/qt/qt_window.cc
  6. 2
      selfdrive/ui/qt/widgets/offroad_alerts.cc

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2bc548145fb72b0ed4a918a222978e279bee02fb9a1f7dee50de242e9b6e2497
size 748068

@ -122,7 +122,7 @@ void OffroadHome::refresh() {
border: 1px solid; border: 1px solid;
border-radius: 5px; border-radius: 5px;
font-size: 40px; font-size: 40px;
font-weight: bold; font-weight: 500;
background-color: #E22C2C; background-color: #E22C2C;
)"); )");
if (alerts_widget->updateAvailable) { if (alerts_widget->updateAvailable) {
@ -276,7 +276,7 @@ void GLWindow::paintGL() {
double cur_draw_t = millis_since_boot(); double cur_draw_t = millis_since_boot();
double dt = cur_draw_t - prev_draw_t; double dt = cur_draw_t - prev_draw_t;
if (dt > 66){ if (dt > 66 && onroad){
// warn on sub 15fps // warn on sub 15fps
LOGW("slow frame(%llu) time: %.2f", ui_state.sm->frame, dt); LOGW("slow frame(%llu) time: %.2f", ui_state.sm->frame, dt);
} }

@ -12,7 +12,10 @@
QLabel * title_label(QString text) { QLabel * title_label(QString text) {
QLabel *l = new QLabel(text); QLabel *l = new QLabel(text);
l->setStyleSheet(R"(font-size: 100px; font-weight: bold;)"); l->setStyleSheet(R"(
font-size: 100px;
font-weight: 400;
)");
return l; return l;
} }

@ -271,12 +271,12 @@ SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) {
QPushButton *btn = new QPushButton(panel.first); QPushButton *btn = new QPushButton(panel.first);
btn->setCheckable(true); btn->setCheckable(true);
btn->setStyleSheet(R"( btn->setStyleSheet(R"(
QPushButton { * {
color: grey; color: grey;
border: none; border: none;
background: none; background: none;
font-size: 65px; font-size: 65px;
font-weight: bold; font-weight: 600;
padding-top: 35px; padding-top: 35px;
padding-bottom: 35px; padding-bottom: 35px;
} }

@ -16,9 +16,6 @@ void setMainWindow(QWidget *w) {
w->setFixedSize(vwp_w*scale, vwp_h*scale); w->setFixedSize(vwp_w*scale, vwp_h*scale);
w->show(); w->show();
QFontDatabase::addApplicationFont("../assets/fonts/inter.ttf");
QApplication::setFont(QFont("Inter"));
#ifdef QCOM2 #ifdef QCOM2
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface(); QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
wl_surface *s = reinterpret_cast<wl_surface*>(native->nativeResourceForWindow("surface", w->windowHandle())); wl_surface *s = reinterpret_cast<wl_surface*>(native->nativeResourceForWindow("surface", w->windowHandle()));

@ -55,7 +55,7 @@ OffroadAlert::OffroadAlert(QWidget* parent) : QFrame(parent) {
QPushButton { QPushButton {
color: black; color: black;
font-size: 50px; font-size: 50px;
font-weight: 600; font-weight: 500;
border-radius: 30px; border-radius: 30px;
background-color: white; background-color: white;
} }

Loading…
Cancel
Save