refactor: MainWindow, use ProcessStop for the stop action and button

This commit is contained in:
sithlord48
2025-01-18 23:50:47 -05:00
committed by Nick Bolton
parent b91681a125
commit c84a8c20c1
8 changed files with 85 additions and 0 deletions

View File

@ -126,7 +126,9 @@ MainWindow::MainWindow(ConfigScopes &configScopes, AppConfig &appConfig)
m_actionSave->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentSaveAs));
m_actionStartCore->setShortcut(QKeySequence(tr("Ctrl+S")));
m_actionStopCore->setShortcut(QKeySequence(tr("Ctrl+T")));
m_actionStopCore->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::ProcessStop));
m_actionReportBug->setIcon(QIcon(QIcon::fromTheme(QStringLiteral("tools-report-bug"))));
@ -860,6 +862,8 @@ void MainWindow::onCoreProcessStateChanged(CoreProcessState state)
connect(ui->btnToggleCore, &QPushButton::clicked, m_actionStopCore, &QAction::trigger, Qt::UniqueConnection);
ui->btnToggleCore->setText(tr("&Stop"));
ui->btnToggleCore->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::ProcessStop));
ui->btnApplySettings->setEnabled(true);
m_actionStartCore->setEnabled(false);
@ -870,6 +874,8 @@ void MainWindow::onCoreProcessStateChanged(CoreProcessState state)
connect(ui->btnToggleCore, &QPushButton::clicked, m_actionStartCore, &QAction::trigger, Qt::UniqueConnection);
ui->btnToggleCore->setText(tr("&Start"));
ui->btnToggleCore->setIcon(QIcon());
ui->btnApplySettings->setEnabled(false);
m_actionStartCore->setEnabled(true);

View File

@ -5,6 +5,7 @@
<file>icons/deskflow-dark/actions/16/document-open.svg</file>
<file>icons/deskflow-dark/actions/16/document-save-as.svg</file>
<file>icons/deskflow-dark/actions/16/help-about.svg</file>
<file>icons/deskflow-dark/actions/16/process-stop.svg</file>
<file>icons/deskflow-dark/actions/16/tools-report-bug.svg</file>
<file>icons/deskflow-dark/actions/16/view-refresh.svg</file>
<file>icons/deskflow-dark/actions/22/configure.svg</file>
@ -12,6 +13,7 @@
<file>icons/deskflow-dark/actions/22/document-open.svg</file>
<file>icons/deskflow-dark/actions/22/document-save-as.svg</file>
<file>icons/deskflow-dark/actions/22/help-about.svg</file>
<file>icons/deskflow-dark/actions/22/process-stop.svg</file>
<file>icons/deskflow-dark/actions/22/tools-report-bug.svg</file>
<file>icons/deskflow-dark/actions/22/view-refresh.svg</file>
<file>icons/deskflow-dark/actions/24/configure.svg</file>
@ -20,6 +22,7 @@
<file>icons/deskflow-dark/actions/24/document-save-as.svg</file>
<file>icons/deskflow-dark/actions/24/edit-clear-all.svg</file>
<file>icons/deskflow-dark/actions/24/help-about.svg</file>
<file>icons/deskflow-dark/actions/24/process-stop.svg</file>
<file>icons/deskflow-dark/actions/24/tools-report-bug.svg</file>
<file>icons/deskflow-dark/actions/24/view-refresh.svg</file>
<file>icons/deskflow-dark/actions/32/configure.svg</file>
@ -59,6 +62,7 @@
<file>icons/deskflow-light/actions/16/document-open.svg</file>
<file>icons/deskflow-light/actions/16/document-save-as.svg</file>
<file>icons/deskflow-light/actions/16/help-about.svg</file>
<file>icons/deskflow-light/actions/16/process-stop.svg</file>
<file>icons/deskflow-light/actions/16/tools-report-bug.svg</file>
<file>icons/deskflow-light/actions/16/view-refresh.svg</file>
<file>icons/deskflow-light/actions/22/configure.svg</file>
@ -67,6 +71,7 @@
<file>icons/deskflow-light/actions/22/document-open.svg</file>
<file>icons/deskflow-light/actions/22/document-save-as.svg</file>
<file>icons/deskflow-light/actions/22/help-about.svg</file>
<file>icons/deskflow-light/actions/22/process-stop.svg</file>
<file>icons/deskflow-light/actions/22/tools-report-bug.svg</file>
<file>icons/deskflow-light/actions/22/view-refresh.svg</file>
<file>icons/deskflow-light/actions/24/configure.svg</file>
@ -75,6 +80,7 @@
<file>icons/deskflow-light/actions/24/document-open.svg</file>
<file>icons/deskflow-light/actions/24/document-save-as.svg</file>
<file>icons/deskflow-light/actions/24/help-about.svg</file>
<file>icons/deskflow-light/actions/24/process-stop.svg</file>
<file>icons/deskflow-light/actions/24/tools-report-bug.svg</file>
<file>icons/deskflow-light/actions/24/view-refresh.svg</file>
<file>icons/deskflow-light/actions/32/configure.svg</file>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">.ColorScheme-NegativeText { color: #da4453; } .ColorScheme-Text { color: #fcfcfc; } </style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-NegativeText" d="M 8 2 A 6 5.9999852 0 0 0 4.5273438 3.1132812 L 5.2460938 3.8320312 A 5 5 0 0 1 8 3 A 5 5 0 0 1 13 8 A 5 5 0 0 1 12.167969 10.753906 L 12.884766 11.470703 A 6 5.9999852 0 0 0 14 8 A 6 5.9999852 0 0 0 8 2 z M 3.1152344 4.5292969 A 6 5.9999852 0 0 0 2 8 A 6 5.9999852 0 0 0 8 14 A 6 5.9999852 0 0 0 11.472656 12.886719 L 10.753906 12.167969 A 5 5 0 0 1 8 13 A 5 5 0 0 1 3 8 A 5 5 0 0 1 3.8320312 5.2460938 L 3.1152344 4.5292969 z M 5 7 L 5 9 L 11 9 L 11 7 L 5 7 z "/>
</svg>

After

Width:  |  Height:  |  Size: 849 B

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">.ColorScheme-NegativeText { color: #da4453; } </style>
</defs>
<g style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-NegativeText">
<path d="M11 3c4.432 0 8 3.568 8 8 0 1.442-.383 2.79-1.045 3.955l-.738-.738A6.985 6.985 0 0 0 18 11c0-3.878-3.122-7-7-7a6.985 6.985 0 0 0-3.217.783l-.738-.738A7.982 7.982 0 0 1 11 3M4.045 7.045l.738.738A6.985 6.985 0 0 0 4 11c0 3.878 3.122 7 7 7a6.985 6.985 0 0 0 3.217-.783l.738.738A7.982 7.982 0 0 1 11 19c-4.432 0-8-3.568-8-8 0-1.442.383-2.79 1.045-3.955"/>
<path d="M7.5 9.998h7v2h-7z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 767 B

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">.ColorScheme-NegativeText { color: #da4453; } </style>
</defs>
<g transform="translate(1,1)">
<g style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-NegativeText">
<path d="M11 3c4.432 0 8 3.568 8 8 0 1.442-.383 2.79-1.045 3.955l-.738-.738A6.985 6.985 0 0 0 18 11c0-3.878-3.122-7-7-7a6.985 6.985 0 0 0-3.217.783l-.738-.738A7.982 7.982 0 0 1 11 3M4.045 7.045l.738.738A6.985 6.985 0 0 0 4 11c0 3.878 3.122 7 7 7a6.985 6.985 0 0 0 3.217-.783l.738.738A7.982 7.982 0 0 1 11 19c-4.432 0-8-3.568-8-8 0-1.442.383-2.79 1.045-3.955"/>
<path d="M7.5 9.998h7v2h-7z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 779 B

View File

@ -0,0 +1,17 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#232629;
}
.ColorScheme-NegativeText {
color:#da4453;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
class="ColorScheme-NegativeText"
d="M 8 2 A 6 5.9999852 0 0 0 4.5273438 3.1132812 L 5.2460938 3.8320312 A 5 5 0 0 1 8 3 A 5 5 0 0 1 13 8 A 5 5 0 0 1 12.167969 10.753906 L 12.884766 11.470703 A 6 5.9999852 0 0 0 14 8 A 6 5.9999852 0 0 0 8 2 z M 3.1152344 4.5292969 A 6 5.9999852 0 0 0 2 8 A 6 5.9999852 0 0 0 8 14 A 6 5.9999852 0 0 0 11.472656 12.886719 L 10.753906 12.167969 A 5 5 0 0 1 8 13 A 5 5 0 0 1 3 8 A 5 5 0 0 1 3.8320312 5.2460938 L 3.1152344 4.5292969 z M 5 7 L 5 9 L 11 9 L 11 7 L 5 7 z "
/>
</svg>

After

Width:  |  Height:  |  Size: 881 B

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-NegativeText {
color:#da4453;
}
</style>
</defs>
<g style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-NegativeText">
<path d="M11 3c4.432 0 8 3.568 8 8 0 1.442-.383 2.79-1.045 3.955l-.738-.738A6.985 6.985 0 0 0 18 11c0-3.878-3.122-7-7-7a6.985 6.985 0 0 0-3.217.783l-.738-.738A7.982 7.982 0 0 1 11 3M4.045 7.045l.738.738A6.985 6.985 0 0 0 4 11c0 3.878 3.122 7 7 7a6.985 6.985 0 0 0 3.217-.783l.738.738A7.982 7.982 0 0 1 11 19c-4.432 0-8-3.568-8-8 0-1.442.383-2.79 1.045-3.955"/>
<path d="M7.5 9.998h7v2h-7z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 776 B

View File

@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-NegativeText {
color:#da4453;
}
</style>
</defs>
<g transform="translate(1,1)">
<g style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-NegativeText">
<path d="M11 3c4.432 0 8 3.568 8 8 0 1.442-.383 2.79-1.045 3.955l-.738-.738A6.985 6.985 0 0 0 18 11c0-3.878-3.122-7-7-7a6.985 6.985 0 0 0-3.217.783l-.738-.738A7.982 7.982 0 0 1 11 3M4.045 7.045l.738.738A6.985 6.985 0 0 0 4 11c0 3.878 3.122 7 7 7a6.985 6.985 0 0 0 3.217-.783l.738.738A7.982 7.982 0 0 1 11 19c-4.432 0-8-3.568-8-8 0-1.442.383-2.79 1.045-3.955"/>
<path d="M7.5 9.998h7v2h-7z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 827 B