| 107 | } |
| 108 | |
| 109 | void WMWindow::RecalculateButtonRects(){ |
| 110 | surface_t* buttons = &wm->compositor.windowButtons; |
| 111 | closeRect = {{size.x - (buttons->width / 3) - 2, (12 - ((buttons->height / 3) / 2))}, {buttons->width / 3, buttons->height / 3}}; |
| 112 | minimizeRect = {{size.x - (buttons->width / 3) * 2 - 4, (12 - ((buttons->height / 3) / 2))}, {buttons->width / 3, buttons->height / 3}}; |
| 113 | } |
| 114 | |
| 115 | rect_t WMWindow::GetBottomBorderRect(){ // Windows with no titlebar also have no borders so don't worry about checking for the no decoration flag |
| 116 | return {{pos.x - WINDOW_BORDER_THICKNESS, pos.y + size.y + WINDOW_TITLEBAR_HEIGHT + WINDOW_BORDER_THICKNESS}, {size.x + WINDOW_BORDER_THICKNESS * 3, WINDOW_BORDER_THICKNESS * 2}}; |