Changeset a130983 in mainline for uspace/lib/ui/src/wdecor.c
- Timestamp:
- 2022-11-17T19:56:07Z (22 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 901b302
- Parents:
- 5d62130
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/wdecor.c
r5d62130 ra130983 88 88 /** Window frame width in text mode */ 89 89 wdecor_frame_w_text = 1, 90 /** Window caption horizontal margin */ 91 wdecor_cap_hmargin = 4, 92 /** Window caption horizontal margin in text mode */ 93 wdecor_cap_hmargin_text = 1, 90 94 /** Close button cross leg length */ 91 95 wdecor_close_cross_n = 5, … … 326 330 fmt.halign = gfx_halign_center; 327 331 fmt.valign = gfx_valign_center; 328 329 pos.x = (trect.p0.x + trect.p1.x) / 2; 330 pos.y = (trect.p0.y + trect.p1.y) / 2; 332 fmt.abbreviate = true; 333 fmt.width = geom.caption_rect.p1.x - 334 geom.caption_rect.p0.x; 335 336 pos.x = (geom.caption_rect.p0.x + geom.caption_rect.p1.x) / 2; 337 pos.y = (geom.caption_rect.p0.y + geom.caption_rect.p1.y) / 2; 331 338 332 339 if (wdecor->res->textmode) { … … 450 457 gfx_coord_t btn_x; 451 458 gfx_coord_t btn_y; 459 gfx_coord_t cap_hmargin; 452 460 453 461 /* Does window have a frame? */ … … 529 537 geom->btn_max_rect.p1.x = btn_x; 530 538 geom->btn_max_rect.p1.y = btn_y + 20; 539 540 btn_x -= 20; 531 541 } else { 532 542 geom->btn_max_rect.p0.x = btn_x - 3; … … 534 544 geom->btn_max_rect.p1.x = btn_x; 535 545 geom->btn_max_rect.p1.y = btn_y + 1; 546 547 btn_x -= 3; 536 548 } 537 549 } else { … … 541 553 geom->btn_max_rect.p1.y = 0; 542 554 } 555 556 if (wdecor->res->textmode == false) 557 cap_hmargin = wdecor_cap_hmargin; 558 else 559 cap_hmargin = wdecor_cap_hmargin_text; 560 561 geom->caption_rect.p0.x = geom->title_bar_rect.p0.x + 562 cap_hmargin; 563 geom->caption_rect.p0.y = geom->title_bar_rect.p0.y; 564 geom->caption_rect.p1.x = btn_x - cap_hmargin; 565 geom->caption_rect.p1.y = geom->title_bar_rect.p1.y; 543 566 } 544 567
Note:
See TracChangeset
for help on using the changeset viewer.