Skip to content

Commit 7e94625

Browse files
committed
[WIP] frontend: Refactor and update Audio Mixer
1 parent 270fe2f commit 7e94625

35 files changed

+2341
-890
lines changed

frontend/cmake/ui-widgets.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ target_link_libraries(obs-studio PRIVATE OBS::qt-vertical-scroll-area)
1010
target_sources(
1111
obs-studio
1212
PRIVATE
13+
widgets/AudioMixer.cpp
14+
widgets/AudioMixer.hpp
1315
widgets/ColorSelect.cpp
1416
widgets/ColorSelect.hpp
1517
widgets/OBSBasic.cpp
@@ -41,7 +43,6 @@ target_sources(
4143
widgets/OBSBasic_Transitions.cpp
4244
widgets/OBSBasic_Updater.cpp
4345
widgets/OBSBasic_VirtualCam.cpp
44-
widgets/OBSBasic_VolControl.cpp
4546
widgets/OBSBasic_YouTube.cpp
4647
widgets/OBSBasicControls.cpp
4748
widgets/OBSBasicControls.hpp
@@ -64,4 +65,6 @@ target_sources(
6465
widgets/VolumeAccessibleInterface.hpp
6566
widgets/VolumeMeter.cpp
6667
widgets/VolumeMeter.hpp
68+
widgets/VolumeName.cpp
69+
widgets/VolumeName.hpp
6770
)

frontend/components/OBSSourceLabel.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,10 @@ void OBSSourceLabel::SourceDestroyed(void *data, calldata_t *)
4343
label.removedSignal.Disconnect();
4444
label.renamedSignal.Disconnect();
4545
}
46+
47+
void OBSSourceLabel::mousePressEvent(QMouseEvent *event)
48+
{
49+
emit clicked();
50+
51+
QLabel::mousePressEvent(event);
52+
}

frontend/components/OBSSourceLabel.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ class OBSSourceLabel : public QLabel {
4242
static void SourceRenamed(void *data, calldata_t *params);
4343
static void SourceRemoved(void *data, calldata_t *params);
4444
static void SourceDestroyed(void *data, calldata_t *params);
45+
void mousePressEvent(QMouseEvent *event);
4546

4647
signals:
4748
void Renamed(const char *name);
4849
void Removed();
4950
void Destroyed();
51+
void clicked();
5052
};

frontend/data/locale/en-US.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,20 @@ Basic.Settings.Advanced.Hotkeys.DisableHotkeysOutOfFocus="Disable hotkeys when m
13271327
Basic.Settings.Advanced.AutoRemux="Automatically remux to %1"
13281328
Basic.Settings.Advanced.AutoRemux.MP4="(record as mkv)"
13291329

1330+
# audio mixer
1331+
Basic.AudioMixer.Pin="Pin"
1332+
Basic.AudioMixer.Unpin="Unpin"
1333+
Basic.AudioMixer.Options="Options"
1334+
Basic.AudioMixer.Hide="Hide"
1335+
Basic.AudioMixer.Unhide="Unhide"
1336+
Basic.AudioMixer.HiddenTotal="%1 hidden"
1337+
Basic.AudioMixer.ShowHidden="Show hidden sources"
1338+
Basic.AudioMixer.KeepHiddenRight="Keep hidden sources to the right"
1339+
Basic.AudioMixer.KeepHiddenBottom="Keep hidden sources at the bottom"
1340+
Basic.AudioMixer.ShowInactive="Show inactive sources"
1341+
Basic.AudioMixer.KeepInactiveRight="Keep inactive sources to the right"
1342+
Basic.AudioMixer.KeepInactiveBottom="Keep inactive sources at the bottom"
1343+
13301344
# advanced audio properties
13311345
Basic.AdvAudio="Advanced Audio Properties"
13321346
Basic.AdvAudio.ActiveOnly="Active Sources Only"
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)