diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 9ca496c03..ec80da17a 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -964,31 +964,30 @@ Window::ControlsLayout WindowControlsLayout() { ); } - Window::ControlsLayout controls; - controls.left = controlsLeft; - controls.right = controlsRight; - - return controls; + return Window::ControlsLayout{ + .left = controlsLeft, + .right = controlsRight + }; } #endif // !TDESKTOP_DISABLE_GTK_INTEGRATION - Window::ControlsLayout controls; - if (DesktopEnvironment::IsUnity()) { - controls.left = { - Window::Control::Close, - Window::Control::Minimize, - Window::Control::Maximize, + return Window::ControlsLayout{ + .left = { + Window::Control::Close, + Window::Control::Minimize, + Window::Control::Maximize, + } }; } else { - controls.right = { - Window::Control::Minimize, - Window::Control::Maximize, - Window::Control::Close, + return Window::ControlsLayout{ + .right = { + Window::Control::Minimize, + Window::Control::Maximize, + Window::Control::Close, + } }; } - - return controls; } } // namespace Platform diff --git a/Telegram/SourceFiles/platform/mac/specific_mac.mm b/Telegram/SourceFiles/platform/mac/specific_mac.mm index 712e42c93..162629e89 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac.mm +++ b/Telegram/SourceFiles/platform/mac/specific_mac.mm @@ -204,14 +204,13 @@ void IgnoreApplicationActivationRightNow() { } Window::ControlsLayout WindowControlsLayout() { - Window::ControlsLayout controls; - controls.left = { - Window::Control::Close, - Window::Control::Minimize, - Window::Control::Maximize, + return Window::ControlsLayout{ + .left = { + Window::Control::Close, + Window::Control::Minimize, + Window::Control::Maximize, + } }; - - return controls; } } // namespace Platform diff --git a/Telegram/SourceFiles/platform/win/specific_win.cpp b/Telegram/SourceFiles/platform/win/specific_win.cpp index ad7ee8a2c..cec77bfa6 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.cpp +++ b/Telegram/SourceFiles/platform/win/specific_win.cpp @@ -325,14 +325,13 @@ bool ShowWindowMenu(QWindow *window) { } Window::ControlsLayout WindowControlsLayout() { - Window::ControlsLayout controls; - controls.right = { - Window::Control::Minimize, - Window::Control::Maximize, - Window::Control::Close, + return Window::ControlsLayout{ + .right = { + Window::Control::Minimize, + Window::Control::Maximize, + Window::Control::Close, + } }; - - return controls; } } // namespace Platform