mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Add elided labels in GPS widget
This commit is contained in:
parent
f8db867076
commit
dcf30358de
@ -188,8 +188,10 @@ GPS::GPS(const int index)
|
||||
m_dataContainer->setLayout(m_gridLayout);
|
||||
|
||||
// Configure position label
|
||||
m_posLabel.setType(Qt::ElideRight);
|
||||
m_posLabel.setStyleSheet(titleQSS);
|
||||
m_posLabel.setText(tr("Loading..."));
|
||||
m_posLabel.setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
|
||||
|
||||
// Configure map labeL
|
||||
m_mapLabel.setStyleSheet(labelQSS);
|
||||
@ -203,7 +205,7 @@ GPS::GPS(const int index)
|
||||
m_layout.addWidget(new QWidget(this));
|
||||
m_layout.setStretch(0, 0);
|
||||
m_layout.setStretch(1, 1);
|
||||
m_layout.setStretch(2, 0);
|
||||
m_layout.setStretch(2, 1);
|
||||
m_layout.setStretch(3, 0);
|
||||
m_layout.setStretch(4, 1);
|
||||
m_layout.setAlignment(&m_posLabel, Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
|
@ -22,12 +22,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QLabel>
|
||||
#include <QWidget>
|
||||
#include <QVBoxLayout>
|
||||
#include <QElapsedTimer>
|
||||
#include <QNetworkAccessManager>
|
||||
|
||||
#include "Common/ElidedLabel.h"
|
||||
|
||||
class QNetworkReply;
|
||||
|
||||
namespace Widgets
|
||||
@ -66,8 +67,8 @@ private:
|
||||
qreal m_lon;
|
||||
qreal m_alt;
|
||||
QLabel m_mapLabel;
|
||||
QLabel m_posLabel;
|
||||
QVBoxLayout m_layout;
|
||||
ElidedLabel m_posLabel;
|
||||
QWidget *m_dataContainer;
|
||||
QGridLayout *m_gridLayout;
|
||||
QVector<QLabel *> m_icons;
|
||||
|
Loading…
x
Reference in New Issue
Block a user