fix: the reencode dialog codec help text being weirdly coloured on different platforms

refactor: build.sh
This commit is contained in:
2026-07-01 21:45:03 +02:00
parent 1a00e98661
commit 515404a220
2 changed files with 36 additions and 11 deletions
+34 -6
View File
@@ -1,6 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
RED="\e[1;31m"
GREEN="\e[1;32m"
BLUE="\e[1;34m"
RESET="\e[0m"
clean() { clean() {
echo "cleaning build dir" echo "cleaning build dir"
rm -rf build rm -rf build
@@ -14,12 +19,30 @@ incremental_build() {
} }
clean_build() { clean_build() {
local starttime endtime elapsed
starttime=$(date +%s)
clean clean
mkdir build
cd build mkdir -p build
echo "doing a clean build" cd build || return 1
cmake ..
make -j"$(nproc)" printf "${BLUE}==> Doing a clean build...${RESET}\n"
cmake .. || {
printf "${RED}CMake configuration failed.${RESET}\n"
return 1
}
if make -j"$(nproc)"; then
endtime=$(date +%s)
elapsed=$((endtime - starttime))
printf "${GREEN}Build completed in %d seconds.${RESET}\n" "$elapsed"
else
printf "${RED}Build failed.${RESET}\n"
return 1
fi
} }
release_build() { release_build() {
@@ -67,7 +90,12 @@ case "${1:-build}" in
clean_appimage clean_appimage
;; ;;
cbr|clean_build_run) cbr|clean_build_run)
clean_build && run_executable clean_build || exit 1
# build leaves us in build dir, so change back 1 so we can run the exec
cd ..
printf "${BLUE} Running Executable ; All logs below are from SubWave ${RESET}"
run_executable || exit 1
printf "${BLUE} Completed running the executable ; DONE ${RESET}\n"
;; ;;
*) *)
echo "Usage: $0 {build|clean|cleanbuild|cb}" echo "Usage: $0 {build|clean|cleanbuild|cb}"
+2 -5
View File
@@ -57,13 +57,10 @@ void ReencodeDialog::buildUi()
m_presetCombo = new QComboBox(this); m_presetCombo = new QComboBox(this);
// Create the description label BEFORE connecting signals and adding items
m_presetDesc = new QLabel(this); m_presetDesc = new QLabel(this);
m_presetDesc->setWordWrap(true); m_presetDesc->setWordWrap(true);
m_presetDesc->setStyleSheet("color: palette(mid);");
settingsGrid->addWidget(m_presetDesc, 1, 1, 1, 2); settingsGrid->addWidget(m_presetDesc, 1, 1, 1, 2);
// Now connect the signal and add items (signal may fire during addItem)
connect(m_presetCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_presetCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &ReencodeDialog::onPresetChanged); this, &ReencodeDialog::onPresetChanged);
for (const auto &p : m_presets) for (const auto &p : m_presets)
@@ -94,7 +91,7 @@ void ReencodeDialog::buildUi()
m_table->setAlternatingRowColors(true); m_table->setAlternatingRowColors(true);
root->addWidget(m_table, 1); root->addWidget(m_table, 1);
// Progress row // progress row
auto *progressLayout = new QHBoxLayout; auto *progressLayout = new QHBoxLayout;
m_statusLabel = new QLabel("Ready", this); m_statusLabel = new QLabel("Ready", this);
m_statusLabel->setMinimumWidth(120); m_statusLabel->setMinimumWidth(120);
@@ -106,7 +103,7 @@ void ReencodeDialog::buildUi()
progressLayout->addWidget(m_overallBar, 1); progressLayout->addWidget(m_overallBar, 1);
root->addLayout(progressLayout); root->addLayout(progressLayout);
// Button row // button row
auto *btnLayout = new QHBoxLayout; auto *btnLayout = new QHBoxLayout;
btnLayout->addStretch(); btnLayout->addStretch();
m_startStopBtn = new QPushButton("Start Encoding", this); m_startStopBtn = new QPushButton("Start Encoding", this);