mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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;
|
return Window::ControlsLayout{
|
||||||
controls.left = controlsLeft;
|
.left = controlsLeft,
|
||||||
controls.right = controlsRight;
|
.right = controlsRight
|
||||||
|
};
|
||||||
return controls;
|
|
||||||
}
|
}
|
||||||
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION
|
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION
|
||||||
|
|
||||||
Window::ControlsLayout controls;
|
|
||||||
|
|
||||||
if (DesktopEnvironment::IsUnity()) {
|
if (DesktopEnvironment::IsUnity()) {
|
||||||
controls.left = {
|
return Window::ControlsLayout{
|
||||||
Window::Control::Close,
|
.left = {
|
||||||
Window::Control::Minimize,
|
Window::Control::Close,
|
||||||
Window::Control::Maximize,
|
Window::Control::Minimize,
|
||||||
|
Window::Control::Maximize,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
controls.right = {
|
return Window::ControlsLayout{
|
||||||
Window::Control::Minimize,
|
.right = {
|
||||||
Window::Control::Maximize,
|
Window::Control::Minimize,
|
||||||
Window::Control::Close,
|
Window::Control::Maximize,
|
||||||
|
Window::Control::Close,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return controls;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Platform
|
} // namespace Platform
|
||||||
|
|
|
@ -204,14 +204,13 @@ void IgnoreApplicationActivationRightNow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Window::ControlsLayout WindowControlsLayout() {
|
Window::ControlsLayout WindowControlsLayout() {
|
||||||
Window::ControlsLayout controls;
|
return Window::ControlsLayout{
|
||||||
controls.left = {
|
.left = {
|
||||||
Window::Control::Close,
|
Window::Control::Close,
|
||||||
Window::Control::Minimize,
|
Window::Control::Minimize,
|
||||||
Window::Control::Maximize,
|
Window::Control::Maximize,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return controls;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Platform
|
} // namespace Platform
|
||||||
|
|
|
@ -325,14 +325,13 @@ bool ShowWindowMenu(QWindow *window) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Window::ControlsLayout WindowControlsLayout() {
|
Window::ControlsLayout WindowControlsLayout() {
|
||||||
Window::ControlsLayout controls;
|
return Window::ControlsLayout{
|
||||||
controls.right = {
|
.right = {
|
||||||
Window::Control::Minimize,
|
Window::Control::Minimize,
|
||||||
Window::Control::Maximize,
|
Window::Control::Maximize,
|
||||||
Window::Control::Close,
|
Window::Control::Close,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return controls;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Platform
|
} // namespace Platform
|
||||||
|
|
Loading…
Add table
Reference in a new issue