mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Construct WindowControlsLayout without variable
This commit is contained in:
parent
5c8a19b7f7
commit
e4b9900a06
3 changed files with 28 additions and 31 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue