MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / RecalculateButtonRects

Method RecalculateButtonRects

System/LemonWM/window.cpp:109–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void 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
115rect_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}};

Callers 1

PollMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected