mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
cabana: reduce the padding in DetailsView (#26126)
old-commit-hash: 988fede1858486ec0679f208540a88533e9296e3
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
// BinaryView
|
||||
|
||||
const int CELL_HEIGHT = 35;
|
||||
const int CELL_HEIGHT = 30;
|
||||
|
||||
BinaryView::BinaryView(QWidget *parent) : QTableView(parent) {
|
||||
model = new BinaryViewModel(this);
|
||||
@@ -156,7 +156,7 @@ void BinarySelectionModel::select(const QItemSelection &selection, QItemSelectio
|
||||
|
||||
BinaryItemDelegate::BinaryItemDelegate(QObject *parent) : QStyledItemDelegate(parent) {
|
||||
// cache fonts and color
|
||||
small_font.setPointSize(7);
|
||||
small_font.setPointSize(6);
|
||||
bold_font.setBold(true);
|
||||
highlight_color = QApplication::style()->standardPalette().color(QPalette::Active, QPalette::Highlight);
|
||||
}
|
||||
|
||||
@@ -85,18 +85,17 @@ SignalEdit::SignalEdit(int index, const QString &msg_id, const Signal &sig, QWid
|
||||
// title bar
|
||||
QHBoxLayout *title_layout = new QHBoxLayout();
|
||||
icon = new QLabel(">");
|
||||
icon->setFixedSize(15, 30);
|
||||
icon->setStyleSheet("font-weight:bold");
|
||||
title_layout->addWidget(icon);
|
||||
title = new ElidedLabel(this);
|
||||
title->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
|
||||
title->setText(QString("%1. %2").arg(index + 1).arg(sig_name));
|
||||
title->setStyleSheet(QString("font-weight:bold; color:%1").arg(getColor(index)));
|
||||
title_layout->addWidget(title);
|
||||
title_layout->addWidget(title, 1);
|
||||
|
||||
QPushButton *plot_btn = new QPushButton("📈");
|
||||
plot_btn->setToolTip(tr("Show Plot"));
|
||||
plot_btn->setFixedSize(30, 30);
|
||||
plot_btn->setFixedSize(20, 20);
|
||||
QObject::connect(plot_btn, &QPushButton::clicked, this, &SignalEdit::showChart);
|
||||
title_layout->addWidget(plot_btn);
|
||||
main_layout->addLayout(title_layout);
|
||||
|
||||
Reference in New Issue
Block a user