Mercurial > libervia-backend
comparison libervia/cli/call_gui.py @ 4322:00837fa13e5a default tip @
tools (common/template), cli (call/gui): use font-awesome instead of fontello:
following change in Libervia Media, code has been updated to use font-awesome now instead
of fontello.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 26 Oct 2024 22:42:17 +0200 |
parents | 0d7bb4df2343 |
children |
comparison
equal
deleted
inserted
replaced
4321:2246eeeccc74 | 4322:00837fa13e5a |
---|---|
203 | 203 |
204 @classmethod | 204 @classmethod |
205 async def run(cls, parent, call_data): | 205 async def run(cls, parent, call_data): |
206 """Run PyQt loop and show the app""" | 206 """Run PyQt loop and show the app""" |
207 media_dir = Path(await parent.host.bridge.config_get("", "media_dir")) | 207 media_dir = Path(await parent.host.bridge.config_get("", "media_dir")) |
208 icons_path = media_dir / "fonts/fontello/svg" | 208 icons_path = media_dir / "fonts/fontawesome/svgs/solid" |
209 app = QApplication([]) | 209 app = QApplication([]) |
210 av_call_gui = cls(parent.host, icons_path) | 210 av_call_gui = cls(parent.host, icons_path) |
211 av_call_gui.show() | 211 av_call_gui.show() |
212 webrtc_call = await webrtc.WebRTCCall.make_webrtc_call( | 212 webrtc_call = await webrtc.WebRTCCall.make_webrtc_call( |
213 parent.host.bridge, | 213 parent.host.bridge, |
253 fullscreen_layout = QHBoxLayout() | 253 fullscreen_layout = QHBoxLayout() |
254 front_layout.addLayout(fullscreen_layout) | 254 front_layout.addLayout(fullscreen_layout) |
255 fullscreen_layout.addStretch() | 255 fullscreen_layout.addStretch() |
256 self.fullscreen_btn = QPushButton("", self) | 256 self.fullscreen_btn = QPushButton("", self) |
257 self.fullscreen_btn.setFixedSize(BUTTON_SIZE) | 257 self.fullscreen_btn.setFixedSize(BUTTON_SIZE) |
258 self.fullscreen_icon_normal = QIcon(str(self.icons_path / "resize-full.svg")) | 258 self.fullscreen_icon_normal = QIcon(str(self.icons_path / "maximize.svg")) |
259 self.fullscreen_icon_fullscreen = QIcon(str(self.icons_path / "resize-small.svg")) | 259 self.fullscreen_icon_fullscreen = QIcon(str(self.icons_path / "minimize.svg")) |
260 self.fullscreen_btn.setIcon(self.fullscreen_icon_normal) | 260 self.fullscreen_btn.setIcon(self.fullscreen_icon_normal) |
261 self.fullscreen_btn.setIconSize(ICON_SIZE) | 261 self.fullscreen_btn.setIconSize(ICON_SIZE) |
262 self.fullscreen_btn.clicked.connect(self.toggle_fullscreen) | 262 self.fullscreen_btn.clicked.connect(self.toggle_fullscreen) |
263 fullscreen_layout.addWidget(self.fullscreen_btn) | 263 fullscreen_layout.addWidget(self.fullscreen_btn) |
264 | 264 |
265 # Control buttons | 265 # Control buttons |
266 self.control_buttons_layout = QHBoxLayout() | 266 self.control_buttons_layout = QHBoxLayout() |
267 self.control_buttons_layout.setSpacing(40) | 267 self.control_buttons_layout.setSpacing(40) |
268 self.toggle_video_btn = cast( | 268 self.toggle_video_btn = cast( |
269 ActivableButton, self.add_control_button("videocam", self.toggle_video) | 269 ActivableButton, self.add_control_button("video", self.toggle_video) |
270 ) | 270 ) |
271 self.toggle_audio_btn = cast( | 271 self.toggle_audio_btn = cast( |
272 ActivableButton, self.add_control_button("volume-up", self.toggle_audio) | 272 ActivableButton, self.add_control_button("volume-high", self.toggle_audio) |
273 ) | 273 ) |
274 self.share_desktop_btn = cast( | 274 self.share_desktop_btn = cast( |
275 ActivableButton, self.add_control_button("desktop", self.share_desktop) | 275 ActivableButton, self.add_control_button("display", self.share_desktop) |
276 ) | 276 ) |
277 self.share_desktop_btn.deactivated_colour = "#47c68e" | 277 self.share_desktop_btn.deactivated_colour = "#47c68e" |
278 self.share_desktop_btn.activated_colour = "#f24468" | 278 self.share_desktop_btn.activated_colour = "#f24468" |
279 self.share_desktop_btn.line_colour = "#666666" | 279 self.share_desktop_btn.line_colour = "#666666" |
280 self.share_desktop_btn.activated = False | 280 self.share_desktop_btn.activated = False |