Skip to content

Commit 0fd62ee

Browse files
committed
refactor(Settings): Change screen share button logic to follow mic and cam
The changing of screen share icon is still missing.
1 parent 6686190 commit 0fd62ee

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/ui/gui/callwindow.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ void CallWindow::init(ParticipantInterface *partInt)
117117
ui_->EndCallButton->hide();
118118

119119
settingsView_.init();
120-
settingsView_.setScreenShareState(false);
121120

122121
// set button icons to correct states
123122
setMicState(settingEnabled(SettingsKey::micStatus));
124123
setCameraState(settingEnabled(SettingsKey::cameraStatus));
124+
setScreenShareState(settingEnabled(SettingsKey::screenShareStatus));
125125
}
126126

127127

@@ -279,6 +279,12 @@ void CallWindow::setCameraState(bool on)
279279
}
280280
}
281281

282+
void CallWindow::setScreenShareState(bool on)
283+
{
284+
Q_UNUSED(on)
285+
// TODO: Change screen share icon
286+
}
287+
282288

283289
void CallWindow::removeParticipant(uint32_t sessionID)
284290
{

src/ui/gui/callwindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public slots:
103103
// set GUI to reflect state
104104
void setMicState(bool on);
105105
void setCameraState(bool on);
106+
void setScreenShareState(bool on);
106107

107108
// helper for setting icons to buttons.
108109
void initButton(QString iconPath, QSize size, QSize iconSize,

src/ui/settings/settings.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void Settings::init()
9494
QObject::connect(basicUI_->screenDevice_combo, &QComboBox::currentTextChanged,
9595
this, &Settings::uiChangedString);
9696

97-
97+
// we must initialize the settings if they do not exist
9898
if (!settings_.value(SettingsKey::micStatus).isValid())
9999
{
100100
setMicState(true);
@@ -106,6 +106,9 @@ void Settings::init()
106106
setCameraState(true);
107107
}
108108

109+
// never start with screen sharing turned on
110+
setScreenShareState(false);
111+
109112
// TODO: Also emit the position of closed window and move this setting there
110113
}
111114

0 commit comments

Comments
 (0)