2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Construct WindowControlsLayout without variable

This commit is contained in:
Ilya Fedin
2020-11-12 11:28:31 +04:00
committed by John Preston
parent 5c8a19b7f7
commit e4b9900a06
3 changed files with 28 additions and 31 deletions

View File

@@ -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