mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
chore: upate icon
This commit is contained in:
parent
1b4bb5c195
commit
94988dca5e
@ -160,8 +160,9 @@ void setupLanguage(const QString &qmFile)
|
||||
{
|
||||
QTranslator *translator = new QTranslator();
|
||||
if (!translator->load(qmFile)) {
|
||||
qWarning("The language file(%1) can not be loaded, English will be used.",
|
||||
qmFile.toUtf8().data());
|
||||
auto info = QString("The language file(%1) can not be loaded, English will be used.")
|
||||
.arg(qmFile);
|
||||
qWarning() << info;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -197,13 +197,13 @@ void ChartsUiSettings::setupTypeComboBox(QComboBox *comboBox, int channelIndex)
|
||||
{
|
||||
m_channelContexts[channelIndex].typeComboBox = comboBox;
|
||||
comboBox->clear();
|
||||
comboBox->addItem(QIcon(":/res/Icons/IconLineSeries.svg"),
|
||||
comboBox->addItem(QIcon(":/res/icons/iconlineseries.svg"),
|
||||
seriesTypeToString(QAbstractSeries::SeriesType::SeriesTypeLine),
|
||||
QAbstractSeries::SeriesType::SeriesTypeLine);
|
||||
comboBox->addItem(QIcon(":/res/Icons/IconSplineSeries.svg"),
|
||||
comboBox->addItem(QIcon(":/res/icons/iconsplineseries.svg"),
|
||||
seriesTypeToString(QAbstractSeries::SeriesType::SeriesTypeSpline),
|
||||
QAbstractSeries::SeriesType::SeriesTypeSpline);
|
||||
comboBox->addItem(QIcon(":/res/Icons/IconScatterSeries.svg"),
|
||||
comboBox->addItem(QIcon(":/res/icons/iconscatterseries.svg"),
|
||||
seriesTypeToString(QAbstractSeries::SeriesType::SeriesTypeScatter),
|
||||
QAbstractSeries::SeriesType::SeriesTypeScatter);
|
||||
connect(comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) {
|
||||
|
||||
@ -156,7 +156,7 @@ IOPage::IOPage(ControllerDirection direction, QSettings *settings, QWidget *pare
|
||||
ui->widgetCharts->layout()->addWidget(m_chartsUi);
|
||||
ui->widgetCharts->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
ui->toolButtonCharts->setCheckable(true);
|
||||
ui->toolButtonCharts->setIcon(QIcon(":/res/Icons/IconChart.svg"));
|
||||
ui->toolButtonCharts->setIcon(QIcon(":/res/icons/iconchart.svg"));
|
||||
ui->toolButtonCharts->setMenu(m_chartsUi->settingsMenu());
|
||||
ui->toolButtonCharts->setPopupMode(QToolButton::MenuButtonPopup);
|
||||
connect(ui->toolButtonCharts, &QToolButton::clicked, this, [this](bool checked) {
|
||||
@ -349,12 +349,12 @@ void IOPage::appendOutputControl(QWidget *widget)
|
||||
void IOPage::initUi()
|
||||
{
|
||||
#if 0
|
||||
const QIcon icon = QIcon(":/res/Icons/IconSettings.svg");
|
||||
const QIcon icon = QIcon(":/res/icons/iconsettings.svg");
|
||||
ui->pushButtonCommunicationSettings->setIcon(icon);
|
||||
ui->pushButtonOutputSettings->setIcon(icon);
|
||||
ui->pushButtonInputSettings->setIcon(icon);
|
||||
#endif
|
||||
ui->toolButtonInputPreset->setIcon(QIcon(":/res/Icons/IconList.svg"));
|
||||
ui->toolButtonInputPreset->setIcon(QIcon(":/res/icons/iconlist.svg"));
|
||||
ui->toolButtonInputPreset->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
ui->toolButtonInputPreset->setStyleSheet("QToolButton::menu-indicator{image: none;}");
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ void QssMgr::loadThemes()
|
||||
|
||||
void QssMgr::updateActions()
|
||||
{
|
||||
for (QAction* action : m_themeActionGroup->actions()) {
|
||||
for (QAction*& action : m_themeActionGroup->actions()) {
|
||||
QString theme = action->data().toString();
|
||||
QString color = m_primaryColorMap.value(theme);
|
||||
updateActionIcon(action, color);
|
||||
@ -189,7 +189,7 @@ void QssMgr::updateActions()
|
||||
void QssMgr::updateActionIcon(QAction* action, const QString& color)
|
||||
{
|
||||
if (action->isChecked()) {
|
||||
action->setIcon(QIcon(":/res/Icons/IconCheck.svg"));
|
||||
action->setIcon(QIcon(":/res/icons/iconcheck.svg"));
|
||||
} else {
|
||||
QPixmap pixmap(64, 64);
|
||||
pixmap.fill(color);
|
||||
@ -247,7 +247,7 @@ void QssMgr::setupActions(const QStringList& themes, QMenu* menu, QActionGroup*
|
||||
void QssMgr::setApplicationStylesheetEnabled(bool enable)
|
||||
{
|
||||
setEnableStylesheet(enable);
|
||||
for (auto action : m_themeActionGroup->actions()) {
|
||||
for (auto& action : m_themeActionGroup->actions()) {
|
||||
if (action->isChecked() && enable) {
|
||||
emit action->triggered();
|
||||
break;
|
||||
|
||||
77
xTools.qrc
77
xTools.qrc
@ -1,76 +1,11 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>res/Icons/IconAdd.svg</file>
|
||||
<file>res/Icons/IconAttachment.svg</file>
|
||||
<file>res/Icons/IconBlueTooth.svg</file>
|
||||
<file>res/Icons/IconBranch.svg</file>
|
||||
<file>res/Icons/IconBuy.svg</file>
|
||||
<file>res/Icons/IconCanBus.svg</file>
|
||||
<file>res/Icons/IconCheck.svg</file>
|
||||
<file>res/Icons/IconClear.svg</file>
|
||||
<file>res/Icons/IconClose.svg</file>
|
||||
<file>res/Icons/IconDate.svg</file>
|
||||
<file>res/Icons/IconEnter.svg</file>
|
||||
<file>res/Icons/IconEsc.svg</file>
|
||||
<file>res/Icons/IconFormat.svg</file>
|
||||
<file>res/Icons/IconHeader.svg</file>
|
||||
<file>res/Icons/IconHistory.svg</file>
|
||||
<file>res/Icons/IconInfo.svg</file>
|
||||
<file>res/Icons/IconLanguage.svg</file>
|
||||
<file>res/Icons/IconList.svg</file>
|
||||
<file>res/Icons/IconListWithIcon.svg</file>
|
||||
<file>res/Icons/IconLog.svg</file>
|
||||
<file>res/Icons/IconMaximized.svg</file>
|
||||
<file>res/Icons/IconMenu.svg</file>
|
||||
<file>res/Icons/IconMinimized.svg</file>
|
||||
<file>res/Icons/IconModbus.svg</file>
|
||||
<file>res/Icons/IconMs.svg</file>
|
||||
<file>res/Icons/IconPing.ico</file>
|
||||
<file>res/Icons/IconPlay.svg</file>
|
||||
<file>res/Icons/IconQQGray.svg</file>
|
||||
<file>res/Icons/IconSend.svg</file>
|
||||
<file>res/Icons/IconSerialPort.svg</file>
|
||||
<file>res/Icons/IconSettings.svg</file>
|
||||
<file>res/Icons/IconStop.svg</file>
|
||||
<file>res/Icons/IconTail.svg</file>
|
||||
<file>res/Icons/IconTcpClient.svg</file>
|
||||
<file>res/Icons/IconTcpServer.svg</file>
|
||||
<file>res/Icons/IconTime.svg</file>
|
||||
<file>res/Icons/IconTimer.svg</file>
|
||||
<file>res/Icons/IconTx.svg</file>
|
||||
<file>res/Icons/IconUdpClient.svg</file>
|
||||
<file>res/Icons/IconUdpServer.svg</file>
|
||||
<file>res/Icons/IconWebSocketClient.svg</file>
|
||||
<file>res/Icons/IconWebSocketServer.svg</file>
|
||||
<file>res/Icons/IconWindowed.svg</file>
|
||||
<file>res/Icons/IconZoomIn.svg</file>
|
||||
<file>res/Icons/IconZoomOut.svg</file>
|
||||
<file>res/Images/Android.png</file>
|
||||
<file>res/Images/AndroidLogo.png</file>
|
||||
<file>res/Images/Gitee.png</file>
|
||||
<file>res/Images/GitHub.png</file>
|
||||
<file>res/Images/Gz.png</file>
|
||||
<file>res/Images/I18n.png</file>
|
||||
<file>res/Images/iOS.png</file>
|
||||
<file>res/Images/Linux.png</file>
|
||||
<file>res/Images/Logo.jpg</file>
|
||||
<file>res/Images/Logo.png</file>
|
||||
<file>res/Images/Logo.svg</file>
|
||||
<file>res/Images/Mac.png</file>
|
||||
<file>res/Images/MainWindow.png</file>
|
||||
<file>res/Images/Pi.png</file>
|
||||
<file>res/Images/QSAKQQ.jpg</file>
|
||||
<file>res/Images/Qt.png</file>
|
||||
<file>res/Images/QtQQ.jpg</file>
|
||||
<file>res/Images/StartUi.jpg</file>
|
||||
<file>res/Images/Windows.png</file>
|
||||
<file>res/Images/Zip.png</file>
|
||||
<file>res/files/history.txt</file>
|
||||
<file>res/translations/xTools_en.qm</file>
|
||||
<file>res/translations/xTools_zh_CN.qm</file>
|
||||
<file>res/Icons/IconChart.svg</file>
|
||||
<file>res/Icons/IconLineSeries.svg</file>
|
||||
<file>res/Icons/IconScatterSeries.svg</file>
|
||||
<file>res/Icons/IconSplineSeries.svg</file>
|
||||
<file>res/icons/iconsplineseries.svg</file>
|
||||
<file>res/icons/iconscatterseries.svg</file>
|
||||
<file>res/icons/iconlineseries.svg</file>
|
||||
<file>res/icons/iconchart.svg</file>
|
||||
<file>res/icons/iconlist.svg</file>
|
||||
<file>res/icons/iconcheck.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user