Changeset e54de59 in mainline
- Timestamp:
- 2023-09-29T16:49:53Z (15 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- be0ec50
- Parents:
- 4034954c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/window.c
r4034954c re54de59 178 178 { 179 179 gfx_coord2_t dims; 180 gfx_coord2_t below_pos; 181 gfx_rect_t below_rect; 180 182 181 183 assert(params->placement != ui_wnd_place_default || … … 211 213 break; 212 214 case ui_wnd_place_popup: 213 /* Place popup window below parent rectangle */ 214 pos->x = params->prect.p0.x; 215 pos->y = params->prect.p1.y; 215 /* Compute rectangle when placed below */ 216 below_pos.x = params->prect.p0.x; 217 below_pos.y = params->prect.p1.y; 218 gfx_rect_translate(&below_pos, ¶ms->rect, &below_rect); 219 220 /* Does below_rect fit within the display? */ 221 if (gfx_rect_is_inside(&below_rect, drect)) { 222 /* Place popup window below parent rectangle */ 223 pos->x = params->prect.p0.x - params->rect.p0.x; 224 pos->y = params->prect.p1.y - params->rect.p0.y; 225 } else { 226 /* Place popup window above parent rectangle */ 227 pos->x = params->prect.p0.x; 228 pos->y = params->prect.p0.y - 229 (params->rect.p1.y - params->rect.p0.y); 230 } 216 231 break; 217 232 }
Note:
See TracChangeset
for help on using the changeset viewer.