2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Moved Windows SMTC as part of cross-platform media controls solution.

This commit is contained in:
23rd
2021-06-04 23:35:56 +03:00
parent f90f1c02c3
commit 1cfbf24635
9 changed files with 42 additions and 31 deletions

View File

@@ -45,6 +45,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/notifications_manager.h"
#include "window/themes/window_theme.h"
#include "window/themes/window_theme_warning.h"
#include "window/system_media_controls_manager.h"
#include "window/window_lock_widgets.h"
#include "window/window_main_menu.h"
#include "window/window_controller.h" // App::wnd.
@@ -81,7 +82,11 @@ void FeedLangTestingKey(int key) {
} // namespace
MainWindow::MainWindow(not_null<Window::Controller*> controller)
: Platform::MainWindow(controller) {
: Platform::MainWindow(controller)
, _mediaControlsManager(Window::SystemMediaControlsManager::Supported()
? std::make_unique<Window::SystemMediaControlsManager>(this)
: nullptr) {
auto logo = Core::App().logo();
icon16 = logo.scaledToWidth(16, Qt::SmoothTransformation);
icon32 = logo.scaledToWidth(32, Qt::SmoothTransformation);