diff --git a/src/controllers/dlgprefcontroller.cpp b/src/controllers/dlgprefcontroller.cpp
index 801d693e551a..c3db33543d8c 100644
--- a/src/controllers/dlgprefcontroller.cpp
+++ b/src/controllers/dlgprefcontroller.cpp
@@ -440,9 +440,21 @@ QString DlgPrefController::mappingFileLinks(
return linkList.join("
");
}
-void DlgPrefController::enumerateMappings() {
- enumerateMappings(m_pControllerManager->getConfiguredMappingFileForDevice(
- m_pController->getName()));
+void DlgPrefController::updateMappingIconsAndColoredLinkTexts() {
+ // re-enumerating mappings is the easiest way to update the list icons
+ enumerateMappings(mappingFilePathFromIndex(m_ui.comboBoxMapping->currentIndex()));
+
+ // Update the colored links
+ createLinkColor();
+ std::shared_ptr pMapping = m_pController->cloneMapping();
+ qWarning() << " .";
+ qWarning() << " .";
+ qWarning() << " support:" << mappingSupportLinks(pMapping);
+ qWarning() << " files: " << mappingFileLinks(pMapping);
+ qWarning() << " .";
+ qWarning() << " .";
+ m_ui.labelLoadedMappingSupportLinks->setText(mappingSupportLinks(pMapping));
+ m_ui.labelLoadedMappingScriptFileLinks->setText(mappingFileLinks(pMapping));
}
void DlgPrefController::enumerateMappings(const QString& selectedMappingPath) {
diff --git a/src/controllers/dlgprefcontroller.h b/src/controllers/dlgprefcontroller.h
index e206ab5d59b4..889dfcafe340 100644
--- a/src/controllers/dlgprefcontroller.h
+++ b/src/controllers/dlgprefcontroller.h
@@ -35,12 +35,8 @@ class DlgPrefController : public DlgPreferencePage {
QUrl helpUrl() const override;
void keyPressEvent(QKeyEvent* pEvent) override;
- /// Reload the mappings in the dropdown dialog.
- /// Convenience method to be called by DlgPrefControllers.
- /// Used to rebuild the mappings list with dark/light icons
- /// matching the current color palette.
- void enumerateMappings();
void enumerateMappings(const QString& selectedMappingPath);
+ void updateMappingIconsAndColoredLinkTexts();
public slots:
/// Called when the preference dialog (not this page) is shown to the user.
diff --git a/src/controllers/dlgprefcontrollers.cpp b/src/controllers/dlgprefcontrollers.cpp
index ff68d1eb4d24..b21bb38cca39 100644
--- a/src/controllers/dlgprefcontrollers.cpp
+++ b/src/controllers/dlgprefcontrollers.cpp
@@ -29,8 +29,7 @@ DlgPrefControllers::DlgPrefControllers(DlgPreferences* pPreferences,
m_pNumSamplers(make_parented(
kAppGroup, QStringLiteral("num_samplers"), this)) {
setupUi(this);
- // Create text color for the cue mode link "?" to the manual
- createLinkColor();
+
setupControllerWidgets();
connect(btnOpenUserMappings, &QPushButton::clicked, this, [this]() {
@@ -44,41 +43,7 @@ DlgPrefControllers::DlgPrefControllers(DlgPreferences* pPreferences,
this,
&DlgPrefControllers::rescanControllers);
- // Setting the description text here instead of in the ui file allows to paste
- // a formatted link (text color is a more readable blend of text color and original link color).
- txtMappingsOverview->setText(tr(
- "Mixxx uses \"mappings\" to connect messages from your controller to "
- "controls in Mixxx. If you do not see a mapping for your controller "
- "in the \"Load Mapping\" menu when you click on your controller on the "
- "left sidebar, you may be able to download one online from the %1. "
- "Place the XML (.xml) and Javascript (.js) file(s) in the \"User Mapping "
- "Folder\" then restart Mixxx. If you download a mapping in a ZIP file, "
- "extract the XML and Javascript file(s) from the ZIP file to your "
- "\"User Mapping Folder\" then restart Mixxx.")
- .arg(coloredLinkString(
- m_pLinkColor,
- QStringLiteral("Mixxx Controller Forums"),
- MIXXX_CONTROLLER_FORUMS_URL)));
-
- txtHardwareCompatibility->setText(coloredLinkString(
- m_pLinkColor,
- tr("Mixxx DJ Hardware Guide"),
- MIXXX_WIKI_HARDWARE_COMPATIBILITY_URL));
-
- txtControllerForums->setText(coloredLinkString(
- m_pLinkColor,
- QStringLiteral("Mixxx Controller Forums"),
- MIXXX_CONTROLLER_FORUMS_URL));
-
- txtControllerMappingFormat->setText(coloredLinkString(
- m_pLinkColor,
- tr("MIDI Mapping File Format"),
- MIXXX_WIKI_CONTROLLER_MAPPING_FORMAT_URL));
-
- txtControllerScripting->setText(coloredLinkString(
- m_pLinkColor,
- tr("MIDI Scripting with Javascript"),
- MIXXX_WIKI_MIDI_SCRIPTING_URL));
+ updateColoredLinkTexts();
}
DlgPrefControllers::~DlgPrefControllers() {
@@ -219,12 +184,54 @@ void DlgPrefControllers::setupControllerWidgets() {
}
}
-void DlgPrefControllers::updateMappingIconsInControllerPages() {
+void DlgPrefControllers::updateMappingIconsAndColoredLinkTexts() {
+ updateColoredLinkTexts();
+
for (auto page : std::as_const(m_controllerPages)) {
- page->enumerateMappings();
+ page->updateMappingIconsAndColoredLinkTexts();
}
}
+void DlgPrefControllers::updateColoredLinkTexts() {
+ // Setting the description text here instead of in the ui file allows to paste
+ // a formatted link (text color is a more readable blend of text color and original link color).
+
+ createLinkColor();
+ txtMappingsOverview->setText(tr(
+ "Mixxx uses \"mappings\" to connect messages from your controller to "
+ "controls in Mixxx. If you do not see a mapping for your controller "
+ "in the \"Load Mapping\" menu when you click on your controller on the "
+ "left sidebar, you may be able to download one online from the %1. "
+ "Place the XML (.xml) and Javascript (.js) file(s) in the \"User Mapping "
+ "Folder\" then restart Mixxx. If you download a mapping in a ZIP file, "
+ "extract the XML and Javascript file(s) from the ZIP file to your "
+ "\"User Mapping Folder\" then restart Mixxx.")
+ .arg(coloredLinkString(
+ m_pLinkColor,
+ QStringLiteral("Mixxx Controller Forums"),
+ MIXXX_CONTROLLER_FORUMS_URL)));
+
+ txtHardwareCompatibility->setText(coloredLinkString(
+ m_pLinkColor,
+ tr("Mixxx DJ Hardware Guide"),
+ MIXXX_WIKI_HARDWARE_COMPATIBILITY_URL));
+
+ txtControllerForums->setText(coloredLinkString(
+ m_pLinkColor,
+ QStringLiteral("Mixxx Controller Forums"),
+ MIXXX_CONTROLLER_FORUMS_URL));
+
+ txtControllerMappingFormat->setText(coloredLinkString(
+ m_pLinkColor,
+ tr("MIDI Mapping File Format"),
+ MIXXX_WIKI_CONTROLLER_MAPPING_FORMAT_URL));
+
+ txtControllerScripting->setText(coloredLinkString(
+ m_pLinkColor,
+ tr("MIDI Scripting with Javascript"),
+ MIXXX_WIKI_MIDI_SCRIPTING_URL));
+}
+
void DlgPrefControllers::slotHighlightDevice(DlgPrefController* pControllerDlg, bool enabled) {
int controllerPageIndex = m_controllerPages.indexOf(pControllerDlg);
if (controllerPageIndex < 0) {
diff --git a/src/controllers/dlgprefcontrollers.h b/src/controllers/dlgprefcontrollers.h
index 11de36298ede..a0392be53421 100644
--- a/src/controllers/dlgprefcontrollers.h
+++ b/src/controllers/dlgprefcontrollers.h
@@ -29,8 +29,8 @@ class DlgPrefControllers : public DlgPreferencePage, public Ui::DlgPrefControlle
bool handleTreeItemClick(QTreeWidgetItem* clickedItem);
QUrl helpUrl() const override;
- /// Calls slotUpdate() of each controller page to update the mapping icons
- void updateMappingIconsInControllerPages();
+ void updateMappingIconsAndColoredLinkTexts();
+ void updateColoredLinkTexts() override;
public slots:
/// Called when the preference dialog (not this page) is shown to the user.
diff --git a/src/preferences/dialog/dlgprefdeck.cpp b/src/preferences/dialog/dlgprefdeck.cpp
index b86c9972959f..f58ea7f1a9fe 100644
--- a/src/preferences/dialog/dlgprefdeck.cpp
+++ b/src/preferences/dialog/dlgprefdeck.cpp
@@ -41,8 +41,6 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent, UserSettingsPointer pConfig)
m_iNumConfiguredDecks(0),
m_iNumConfiguredSamplers(0) {
setupUi(this);
- // Create text color for the cue mode link "?" to the manual
- createLinkColor();
m_pNumDecks->connectValueChanged(this, [=, this](double value) { slotNumDecksChanged(value); });
slotNumDecksChanged(m_pNumDecks->get(), true);
@@ -291,21 +289,11 @@ DlgPrefDeck::DlgPrefDeck(QWidget* parent, UserSettingsPointer pConfig)
pControl->set(static_cast(m_keyunlockMode));
}
- // Cue Mode
- // Add "(?)" with a manual link to the label
- labelCueMode->setText(labelCueMode->text() + QChar(' ') +
- coloredLinkString(
- m_pLinkColor,
- QStringLiteral("(?)"),
- MIXXX_MANUAL_CUE_MODES_URL));
-
- // Sync Mode
- // Add "(?)" with a manual link to the label
- labelSyncMode->setText(labelSyncMode->text() + QChar(' ') +
- coloredLinkString(
- m_pLinkColor,
- QStringLiteral("(?)"),
- MIXXX_MANUAL_SYNC_MODES_URL));
+ // Store translated label texts
+ labelCueMode->setProperty(kOriginalText, labelCueMode->text());
+ labelSyncMode->setProperty(kOriginalText, labelSyncMode->text());
+ // Create text color manual links
+ updateColoredLinkTexts();
// Speed / Pitch reset configuration
// Update "reset speed" and "reset pitch" check boxes
@@ -506,6 +494,26 @@ void DlgPrefDeck::slotUpdate() {
spinBoxPermanentRateFine->setValue(RateControl::getPermanentRateChangeFineAmount());
}
+void DlgPrefDeck::updateColoredLinkTexts() {
+ createLinkColor();
+ // Cue Mode
+ // Add "(?)" with a manual link to the label
+ labelCueMode->setText(
+ labelCueMode->property(kOriginalText).toString() + QChar(' ') +
+ coloredLinkString(
+ m_pLinkColor,
+ QStringLiteral("(?)"),
+ MIXXX_MANUAL_CUE_MODES_URL));
+ // Sync Mode
+ // Add "(?)" with a manual link to the label
+ labelSyncMode->setText(
+ labelSyncMode->property(kOriginalText).toString() + QChar(' ') +
+ coloredLinkString(
+ m_pLinkColor,
+ QStringLiteral("(?)"),
+ MIXXX_MANUAL_SYNC_MODES_URL));
+}
+
void DlgPrefDeck::slotResetToDefaults() {
// Track time display mode
radioButtonRemaining->setChecked(true);
diff --git a/src/preferences/dialog/dlgprefdeck.h b/src/preferences/dialog/dlgprefdeck.h
index df64bd7af98c..b4a2e86804aa 100644
--- a/src/preferences/dialog/dlgprefdeck.h
+++ b/src/preferences/dialog/dlgprefdeck.h
@@ -95,6 +95,8 @@ class DlgPrefDeck : public DlgPreferencePage, public Ui::DlgPrefDeckDlg {
void slotUpdateSpeedAutoReset(bool);
void slotUpdatePitchAutoReset(bool);
+ void updateColoredLinkTexts() override;
+
private:
// Because the CueDefault list is out of order, we have to set the combo
// box using the user data, not the index. Returns the index of the item
diff --git a/src/preferences/dialog/dlgpreferencepage.h b/src/preferences/dialog/dlgpreferencepage.h
index 8e1d40f21ab3..e9c674728ec6 100644
--- a/src/preferences/dialog/dlgpreferencepage.h
+++ b/src/preferences/dialog/dlgpreferencepage.h
@@ -1,5 +1,6 @@
#pragma once
+#include
#include
#include
#include
@@ -38,6 +39,8 @@ class DlgPreferencePage : public QWidget {
QColor m_pLinkColor;
+ const char* kOriginalText = "originalText";
+
public slots:
/// Called when the preference dialog is shown to the user (not necessarily
/// when this PreferencePage is shown to the user). At this point, the
@@ -81,4 +84,7 @@ class DlgPreferencePage : public QWidget {
palette().text().color())
.name();
}
+
+ virtual void updateColoredLinkTexts() {
+ }
};
diff --git a/src/preferences/dialog/dlgpreferences.cpp b/src/preferences/dialog/dlgpreferences.cpp
index 477649c836cc..7b5af4dd8d6b 100644
--- a/src/preferences/dialog/dlgpreferences.cpp
+++ b/src/preferences/dialog/dlgpreferences.cpp
@@ -320,7 +320,7 @@ bool DlgPreferences::eventFilter(QObject* o, QEvent* e) {
if (e->type() == QEvent::StyleChange) {
// The stylesheet has been changed or reloaded,
// update the tree icons to match the new palette.
- updateTreeIcons();
+ updateTreeIconsAndColoredLinks();
}
// Standard event processing
@@ -482,13 +482,14 @@ void DlgPreferences::addPageWidget(const PreferencesPage& page) {
page.pDlg->sizeHint() + QSize(iframe, iframe));
}
-void DlgPreferences::updateTreeIcons() {
+void DlgPreferences::updateTreeIconsAndColoredLinks() {
selectIconsPath();
for (const auto& page : std::as_const(m_allPages)) {
page.pTreeItem->setIcon(0, QIcon(m_iconsPath.filePath(page.iconFileName)));
+ page.pDlg->updateColoredLinkTexts();
}
// Update icons in controller mapping list
- m_pControllersDlg->updateMappingIconsInControllerPages();
+ m_pControllersDlg->updateMappingIconsAndColoredLinkTexts();
}
void DlgPreferences::selectIconsPath() {
diff --git a/src/preferences/dialog/dlgpreferences.h b/src/preferences/dialog/dlgpreferences.h
index 7bd7e4605c26..3d2c6c75161e 100644
--- a/src/preferences/dialog/dlgpreferences.h
+++ b/src/preferences/dialog/dlgpreferences.h
@@ -96,7 +96,7 @@ class DlgPreferences : public QDialog, public Ui::DlgPreferencesDlg {
QList m_allPages;
void onShow();
void onHide();
- void updateTreeIcons();
+ void updateTreeIconsAndColoredLinks();
void selectIconsPath();
QRect getDefaultGeometry();
diff --git a/src/preferences/dialog/dlgpreflibrary.cpp b/src/preferences/dialog/dlgpreflibrary.cpp
index d25f6376c46b..7071bb0dba6b 100644
--- a/src/preferences/dialog/dlgpreflibrary.cpp
+++ b/src/preferences/dialog/dlgpreflibrary.cpp
@@ -132,26 +132,19 @@ DlgPrefLibrary::DlgPrefLibrary(
#endif
builtInFormats->setText(builtInFormatsStr);
+ // Store translated label texts
+ label_settingsManualLink->setProperty(kOriginalText, tr("See the manual for details"));
+ label_searchBpmFuzzyRangeInfo->setProperty(
+ kOriginalText, label_searchBpmFuzzyRangeInfo->text());
// Create text color manual links
- createLinkColor();
- // Add link to the manual where configuration files are explained in detail
- label_settingsManualLink->setText(coloredLinkString(
- m_pLinkColor,
- tr("See the manual for details"),
- MIXXX_MANUAL_SETTINGS_DIRECTORY_URL));
+ updateColoredLinkTexts();
+
// TODO It seems this isnot required anymore with Qt 6.2.3
connect(label_settingsManualLink,
&QLabel::linkActivated,
[](const QString& url) {
mixxx::DesktopHelper::openUrl(url);
});
-
- // Add link to the track search documentation
- label_searchBpmFuzzyRangeInfo->setText(
- label_searchBpmFuzzyRangeInfo->text() + QStringLiteral(" ") +
- coloredLinkString(m_pLinkColor,
- QStringLiteral("(?)"),
- MIXXX_MANUAL_SETTINGS_DIRECTORY_URL));
connect(label_searchBpmFuzzyRangeInfo,
&QLabel::linkActivated,
[](const QString& url) {
@@ -388,6 +381,22 @@ void DlgPrefLibrary::slotUpdate() {
checkbox_played_track_color->setChecked(applyPlayedTrackColor);
}
+void DlgPrefLibrary::updateColoredLinkTexts() {
+ createLinkColor();
+ // Add link to the manual where configuration files are explained in detail
+ label_settingsManualLink->setText(coloredLinkString(
+ m_pLinkColor,
+ label_settingsManualLink->property(kOriginalText).toString(),
+ MIXXX_MANUAL_SETTINGS_DIRECTORY_URL));
+ // Add link to the track search documentation
+ label_searchBpmFuzzyRangeInfo->setText(
+ label_searchBpmFuzzyRangeInfo->property(kOriginalText).toString() +
+ QStringLiteral(" ") +
+ coloredLinkString(m_pLinkColor,
+ QStringLiteral("(?)"),
+ MIXXX_MANUAL_SETTINGS_DIRECTORY_URL));
+}
+
void DlgPrefLibrary::slotCancel() {
// Undo any changes in the library font or row height.
m_pLibrary->setFont(m_originalTrackTableFont);
diff --git a/src/preferences/dialog/dlgpreflibrary.h b/src/preferences/dialog/dlgpreflibrary.h
index ea5f75457b24..7b4ec32193a5 100644
--- a/src/preferences/dialog/dlgpreflibrary.h
+++ b/src/preferences/dialog/dlgpreflibrary.h
@@ -38,6 +38,8 @@ class DlgPrefLibrary : public DlgPreferencePage, public Ui::DlgPrefLibraryDlg {
QUrl helpUrl() const override;
+ void updateColoredLinkTexts() override;
+
public slots:
// Common preference page slots.
void slotUpdate() override;
diff --git a/src/preferences/dialog/dlgprefmodplug.cpp b/src/preferences/dialog/dlgprefmodplug.cpp
index 5643482bd9d4..d70067239040 100644
--- a/src/preferences/dialog/dlgprefmodplug.cpp
+++ b/src/preferences/dialog/dlgprefmodplug.cpp
@@ -14,8 +14,6 @@ DlgPrefModplug::DlgPrefModplug(QWidget *parent,
m_pUi(new Ui::DlgPrefModplug),
m_pConfig(_config) {
m_pUi->setupUi(this);
- // Create text color for the OpenMTP manual link
- createLinkColor();
m_pUi->advancedSettings->setVisible(m_pUi->showAdvanced->isChecked());
connect(m_pUi->memoryLimit,
@@ -31,13 +29,7 @@ DlgPrefModplug::DlgPrefModplug(QWidget *parent,
m_pUi->advancedSettings,
&QWidget::setVisible);
- m_pUi->modplugSettingsHint->setText(
- tr("All settings take effect on next track load. Currently loaded tracks "
- "are not affected. For an explanation of these settings, see the %1")
- .arg(coloredLinkString(
- m_pLinkColor,
- "OpenMPT manual",
- "http://wiki.openmpt.org/Manual:_Setup/Player")));
+ updateColoredLinkTexts();
setScrollSafeGuardForAllInputWidgets(this);
}
@@ -211,3 +203,15 @@ void DlgPrefModplug::applySettings() {
// apply modplug settings
mixxx::SoundSourceModPlug::configure(bufferSizeLimit, settings);
}
+
+void DlgPrefModplug::updateColoredLinkTexts() {
+ createLinkColor();
+
+ m_pUi->modplugSettingsHint->setText(
+ tr("All settings take effect on next track load. Currently loaded tracks "
+ "are not affected. For an explanation of these settings, see the %1")
+ .arg(coloredLinkString(
+ m_pLinkColor,
+ "OpenMPT manual",
+ "http://wiki.openmpt.org/Manual:_Setup/Player")));
+}
diff --git a/src/preferences/dialog/dlgprefmodplug.h b/src/preferences/dialog/dlgprefmodplug.h
index d484face2201..6f01e1113030 100644
--- a/src/preferences/dialog/dlgprefmodplug.h
+++ b/src/preferences/dialog/dlgprefmodplug.h
@@ -16,6 +16,8 @@ class DlgPrefModplug : public DlgPreferencePage {
explicit DlgPrefModplug(QWidget* parent, UserSettingsPointer _config);
virtual ~DlgPrefModplug();
+ void updateColoredLinkTexts() override;
+
public slots:
void slotApply() override;
void slotUpdate() override;
diff --git a/src/preferences/dialog/dlgprefsound.cpp b/src/preferences/dialog/dlgprefsound.cpp
index 1a75a9c47570..a7ed8d803bdc 100644
--- a/src/preferences/dialog/dlgprefsound.cpp
+++ b/src/preferences/dialog/dlgprefsound.cpp
@@ -284,31 +284,14 @@ DlgPrefSound::DlgPrefSound(QWidget* pParent,
#ifdef __LINUX__
qDebug() << "RLimit Cur " << RLimit::getCurRtPrio();
qDebug() << "RLimit Max " << RLimit::getMaxRtPrio();
-
- if (RLimit::isRtPrioAllowed()) {
- realtimeHint->setText(tr("Realtime scheduling is enabled."));
- } else {
- realtimeHint->setText(
- tr("To enable Realtime scheduling (currently disabled), see the %1.")
- .arg(coloredLinkString(
- m_pLinkColor,
- QStringLiteral("Mixxx Wiki"),
- MIXXX_WIKI_AUDIO_LATENCY_URL)));
- }
#else
// the limits warning is a Linux only thing
realtimeHint->hide();
#endif // __LINUX__
- setScrollSafeGuardForAllInputWidgets(this);
+ updateColoredLinkTexts();
- hardwareGuide->setText(
- tr("The %1 lists sound cards and controllers you may want to "
- "consider for using Mixxx.")
- .arg(coloredLinkString(
- m_pLinkColor,
- tr("Mixxx DJ Hardware Guide"),
- MIXXX_WIKI_HARDWARE_COMPATIBILITY_URL)));
+ setScrollSafeGuardForAllInputWidgets(this);
}
/// Slot called when the preferences dialog is opened.
@@ -383,6 +366,34 @@ QUrl DlgPrefSound::helpUrl() const {
return QUrl(MIXXX_MANUAL_SOUND_URL);
}
+void DlgPrefSound::updateColoredLinkTexts() {
+ createLinkColor();
+
+#ifdef __LINUX__
+ qDebug() << "RLimit Cur " << RLimit::getCurRtPrio();
+ qDebug() << "RLimit Max " << RLimit::getMaxRtPrio();
+
+ if (RLimit::isRtPrioAllowed()) {
+ realtimeHint->setText(tr("Realtime scheduling is enabled."));
+ } else {
+ realtimeHint->setText(
+ tr("To enable Realtime scheduling (currently disabled), see the %1.")
+ .arg(coloredLinkString(
+ m_pLinkColor,
+ QStringLiteral("Mixxx Wiki"),
+ MIXXX_WIKI_AUDIO_LATENCY_URL)));
+ }
+#endif // __LINUX__
+
+ hardwareGuide->setText(
+ tr("The %1 lists sound cards and controllers you may want to "
+ "consider for using Mixxx.")
+ .arg(coloredLinkString(
+ m_pLinkColor,
+ tr("Mixxx DJ Hardware Guide"),
+ MIXXX_WIKI_HARDWARE_COMPATIBILITY_URL)));
+}
+
/// Initializes (and creates) all the path items. Each path item widget allows
/// the user to input a sound device name and channel number given a description
/// of what will be done with that info. Inputs and outputs are grouped by tab,
diff --git a/src/preferences/dialog/dlgprefsound.h b/src/preferences/dialog/dlgprefsound.h
index ef8b5f0c81c2..7a865ac8f484 100644
--- a/src/preferences/dialog/dlgprefsound.h
+++ b/src/preferences/dialog/dlgprefsound.h
@@ -33,6 +33,8 @@ class DlgPrefSound : public DlgPreferencePage, public Ui::DlgPrefSoundDlg {
QUrl helpUrl() const override;
+ void updateColoredLinkTexts() override;
+
signals:
void loadPaths(const SoundManagerConfig &config);
void writePaths(SoundManagerConfig *config);
diff --git a/src/preferences/dialog/dlgprefvinyl.cpp b/src/preferences/dialog/dlgprefvinyl.cpp
index 18d4aff5b61a..30b12e0155fc 100644
--- a/src/preferences/dialog/dlgprefvinyl.cpp
+++ b/src/preferences/dialog/dlgprefvinyl.cpp
@@ -24,8 +24,6 @@ DlgPrefVinyl::DlgPrefVinyl(
m_pNumDecks->connectValueChanged(this, &DlgPrefVinyl::slotNumDecksChanged);
setupUi(this);
- // Create text color for the Troubleshooting link
- createLinkColor();
// Add per-deck vinyl selectors
m_vcLabels = {VinylLabel1,
@@ -80,12 +78,6 @@ DlgPrefVinyl::DlgPrefVinyl(
signalQualityLayout->addWidget(widget);
}
- TroubleshootingLink->setText(coloredLinkString(
- m_pLinkColor,
- // QStringLiteral("Troubleshooting") fails to compile on Fedora 36 with GCC 12.0.x
- "Troubleshooting",
- MIXXX_MANUAL_VINYL_TROUBLESHOOTING_URL));
-
connect(SliderVinylGain, &QSlider::sliderReleased, this, &DlgPrefVinyl::slotVinylGainApply);
connect(SliderVinylGain,
QOverload::of(&QSlider::valueChanged),
@@ -96,6 +88,8 @@ DlgPrefVinyl::DlgPrefVinyl(
setDeckWidgetsVisible(i, false);
}
+ updateColoredLinkTexts();
+
setScrollSafeGuardForAllInputWidgets(this);
slotNumDecksChanged(m_pNumDecks->get());
@@ -297,6 +291,16 @@ QUrl DlgPrefVinyl::helpUrl() const {
return QUrl(MIXXX_MANUAL_VINYL_URL);
}
+void DlgPrefVinyl::updateColoredLinkTexts() {
+ createLinkColor();
+
+ TroubleshootingLink->setText(coloredLinkString(
+ m_pLinkColor,
+ // QStringLiteral("Troubleshooting") fails to compile on Fedora 36 with GCC 12.0.x
+ "Troubleshooting",
+ MIXXX_MANUAL_VINYL_TROUBLESHOOTING_URL));
+}
+
void DlgPrefVinyl::setDeckWidgetsVisible(int deck, bool visible) {
if (deck < 0 || deck > 3) {
qWarning() << "Tried to set a vinyl preference widget visible that doesn't exist: " << deck;
diff --git a/src/preferences/dialog/dlgprefvinyl.h b/src/preferences/dialog/dlgprefvinyl.h
index ee7c1d3ca3eb..14253dbcbf6a 100644
--- a/src/preferences/dialog/dlgprefvinyl.h
+++ b/src/preferences/dialog/dlgprefvinyl.h
@@ -24,6 +24,8 @@ class DlgPrefVinyl : public DlgPreferencePage, Ui::DlgPrefVinylDlg {
QUrl helpUrl() const override;
+ void updateColoredLinkTexts() override;
+
public slots:
void slotUpdate() override;
void slotApply() override;