From 9fa879ada828ab088869ee97f0b6b00cef4e79d3 Mon Sep 17 00:00:00 2001 From: cg2121 Date: Tue, 10 Dec 2024 06:23:03 -0600 Subject: [PATCH] UI: Move media control dynamic properties to ui file This moves the dynamic properties for the media control buttons from the cpp file to the ui file. --- UI/forms/source-toolbar/media-controls.ui | 12 ++++++++++++ UI/media-controls.cpp | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/UI/forms/source-toolbar/media-controls.ui b/UI/forms/source-toolbar/media-controls.ui index 1a2a47f2b05b61..3debf8253eb8f5 100644 --- a/UI/forms/source-toolbar/media-controls.ui +++ b/UI/forms/source-toolbar/media-controls.ui @@ -74,6 +74,9 @@ true + + icon-media-play + @@ -112,6 +115,9 @@ true + + icon-media-prev + @@ -150,6 +156,9 @@ true + + icon-media-stop + @@ -188,6 +197,9 @@ true + + icon-media-next + diff --git a/UI/media-controls.cpp b/UI/media-controls.cpp index df720cc3caa257..bf5efff2ed0613 100644 --- a/UI/media-controls.cpp +++ b/UI/media-controls.cpp @@ -46,10 +46,6 @@ void MediaControls::OBSMediaPrevious(void *data, calldata_t *) MediaControls::MediaControls(QWidget *parent) : QWidget(parent), ui(new Ui::MediaControls) { ui->setupUi(this); - ui->playPauseButton->setProperty("class", "icon-media-play"); - ui->previousButton->setProperty("class", "icon-media-prev"); - ui->nextButton->setProperty("class", "icon-media-next"); - ui->stopButton->setProperty("class", "icon-media-stop"); setFocusPolicy(Qt::StrongFocus); connect(&mediaTimer, &QTimer::timeout, this, &MediaControls::SetSliderPosition);