| 51 | } |
| 52 | |
| 53 | static inline void repositionCloseButton(Widget& closeButton, int32_t windowWidth, bool translucent) |
| 54 | { |
| 55 | auto closeButtonSize = Config::Get().interface.enlargedUi ? kCloseButtonSizeTouch : kCloseButtonSize; |
| 56 | if (Config::Get().interface.windowButtonsOnTheLeft) |
| 57 | { |
| 58 | closeButton.left = 2; |
| 59 | closeButton.right = 2 + closeButtonSize; |
| 60 | } |
| 61 | else |
| 62 | { |
| 63 | closeButton.left = windowWidth - 3 - closeButtonSize; |
| 64 | closeButton.right = windowWidth - 3; |
| 65 | } |
| 66 | |
| 67 | // Set appropriate close button |
| 68 | if (closeButtonSize == kCloseButtonSizeTouch) |
| 69 | closeButton.string = !translucent ? kCloseBoxStringBlackLarge : kCloseBoxStringWhiteLarge; |
| 70 | else |
| 71 | closeButton.string = !translucent ? kCloseBoxStringBlackNormal : kCloseBoxStringWhiteNormal; |
| 72 | } |
| 73 | |
| 74 | void WindowBase::resizeFrame() |
| 75 | { |