mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Style
This commit is contained in:
committed by
Mat Sutcliffe
parent
ae3ebdd443
commit
0a013fc906
@@ -76,7 +76,6 @@ namespace BlackGui
|
||||
QPushButton *button = new QPushButton(this);
|
||||
button->setText(station.getCallsignAsString());
|
||||
if (m_withIcons) { button->setIcon(station.toPixmap()); }
|
||||
// else { button->setStyleSheet("text-align: left;"); }
|
||||
QObject::connect(button, &QPushButton::released, this, &CAtcButtonComponent::onButtonClicked);
|
||||
const CVariant atcv = CVariant::fromValue(station);
|
||||
layout->addWidget(button, row, col++);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace BlackGui
|
||||
explicit CInfoBarStatusComponent(QWidget *parent = nullptr);
|
||||
|
||||
//!Destructor
|
||||
virtual ~CInfoBarStatusComponent();
|
||||
virtual ~CInfoBarStatusComponent() override;
|
||||
|
||||
//! DBus used?
|
||||
void setDBusStatus(bool dbus);
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace BlackGui
|
||||
|
||||
void CRawFsdMessagesComponent::enableDisableRawFsdMessages()
|
||||
{
|
||||
//! \fixme KB 2019-03 hardcoded style sheet
|
||||
bool enable;
|
||||
if (ui->pb_EnableDisable->text() == "Enable")
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "blackgui/components/transpondercodespinbox.h"
|
||||
|
||||
#include <QChar>
|
||||
|
||||
namespace BlackGui
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include <QSpinBox>
|
||||
#include <QString>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace BlackGui
|
||||
this->setWindowTitle("Info status bar");
|
||||
this->setWindowIcon(CIcons::swift24());
|
||||
this->onStyleSheetsChanged(); // margins from infobar
|
||||
|
||||
// style changed overridden from CDockWidget
|
||||
}
|
||||
|
||||
void CDockWidgetInfoBar::addToContextMenu(QMenu *contextMenu) const
|
||||
@@ -34,7 +36,10 @@ namespace BlackGui
|
||||
|
||||
void CDockWidgetInfoBar::onStyleSheetsChanged()
|
||||
{
|
||||
// overridden from CDockWidget
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
const QString st = sGui->getStyleSheetUtility().style(CStyleSheetUtility::fileNameInfoBar());
|
||||
this->setStyleSheet("");
|
||||
this->setStyleSheet(st);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <QObject>
|
||||
|
||||
class QMenu;
|
||||
class QWidget;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
//! Representing a ticked or crossed icon
|
||||
@@ -49,10 +47,10 @@ namespace BlackGui
|
||||
void tickChanged(bool ticked);
|
||||
|
||||
private:
|
||||
bool m_isPixmapTicked = false; //!< ticked state
|
||||
QString m_toolTipTicked = "on";
|
||||
bool m_isPixmapTicked = false; //!< ticked state
|
||||
QString m_toolTipTicked = "on";
|
||||
QString m_toolTipUnticked = "off";
|
||||
QPixmap m_pixmapTicked = BlackMisc::CIcons::tick16();
|
||||
QPixmap m_pixmapTicked = BlackMisc::CIcons::tick16();
|
||||
QPixmap m_pixmapUnticked = BlackMisc::CIcons::cross16();
|
||||
|
||||
//! Set the label
|
||||
|
||||
@@ -40,7 +40,8 @@ namespace BlackGui
|
||||
QCheckBox *cb = new QCheckBox(parent);
|
||||
if (!m_iconCheckedUrl.isEmpty() && !m_iconUncheckedUrl.isEmpty())
|
||||
{
|
||||
QString style = CStyleSheetUtility::styleForIconCheckBox(m_iconCheckedUrl, m_iconUncheckedUrl);
|
||||
const QString style = CStyleSheetUtility::styleForIconCheckBox(m_iconCheckedUrl, m_iconUncheckedUrl);
|
||||
cb->setStyleSheet("");
|
||||
cb->setStyleSheet(style);
|
||||
}
|
||||
return cb;
|
||||
@@ -48,7 +49,7 @@ namespace BlackGui
|
||||
|
||||
void CCheckBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
|
||||
{
|
||||
bool v = index.model()->data(index, Qt::UserRole).toBool();
|
||||
const bool v = index.model()->data(index, Qt::UserRole).toBool();
|
||||
QCheckBox *cb = qobject_cast<QCheckBox *>(editor);
|
||||
cb->setChecked(v);
|
||||
}
|
||||
@@ -56,7 +57,7 @@ namespace BlackGui
|
||||
void CCheckBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
|
||||
{
|
||||
QCheckBox *cb = qobject_cast<QCheckBox *>(editor);
|
||||
bool v = cb->isChecked();
|
||||
const bool v = cb->isChecked();
|
||||
model->setData(index, QVariant(v), Qt::EditRole);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ void CSwiftData::initStyleSheet()
|
||||
CStyleSheetUtility::fileNameStandardWidget(),
|
||||
CStyleSheetUtility::fileNameSwiftData()
|
||||
});
|
||||
|
||||
this->setStyleSheet("");
|
||||
this->setStyleSheet(s);
|
||||
}
|
||||
|
||||
|
||||
@@ -329,7 +329,14 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="BlackGui::Components::CInfoBarStatusComponent" name="comp_InfoBarStatus" native="true"/>
|
||||
<widget class="BlackGui::Components::CInfoBarStatusComponent" name="comp_InfoBarStatus" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user