Changeset 45004f3 in mainline
- Timestamp:
- 2021-09-01T09:45:37Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1ebcb791
- Parents:
- b79c91cc
- git-author:
- Jiri Svoboda <jiri@…> (2021-08-31 19:44:34)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-09-01 09:45:37)
- Location:
- uspace
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/calculator/calculator.c
rb79c91cc r45004f3 833 833 if (ui_is_textmode(ui)) { 834 834 params.rect.p1.x = 38; 835 params.rect.p1.y = 1 9;835 params.rect.p1.y = 18; 836 836 837 837 calc.geom.menubar_rect.p0.x = 1; 838 calc.geom.menubar_rect.p0.y = 2;838 calc.geom.menubar_rect.p0.y = 1; 839 839 calc.geom.menubar_rect.p1.x = params.rect.p1.x - 1; 840 calc.geom.menubar_rect.p1.y = 3;840 calc.geom.menubar_rect.p1.y = 2; 841 841 calc.geom.entry_rect.p0.x = 4; 842 calc.geom.entry_rect.p0.y = 4;842 calc.geom.entry_rect.p0.y = 3; 843 843 calc.geom.entry_rect.p1.x = 34; 844 calc.geom.entry_rect.p1.y = 5;844 calc.geom.entry_rect.p1.y = 4; 845 845 calc.geom.btn_orig.x = 4; 846 calc.geom.btn_orig.y = 6;846 calc.geom.btn_orig.y = 5; 847 847 calc.geom.btn_dim.x = 6; 848 848 calc.geom.btn_dim.y = 2; -
uspace/app/uidemo/uidemo.c
rb79c91cc r45004f3 540 540 if (ui_is_textmode(ui)) { 541 541 rect.p0.x = 1; 542 rect.p0.y = 2;542 rect.p0.y = 1; 543 543 rect.p1.x = 79; 544 rect.p1.y = 3;544 rect.p1.y = 2; 545 545 } else { 546 546 rect.p0.x = 4; -
uspace/lib/ui/src/filedialog.c
rb79c91cc r45004f3 112 112 wparams.rect.p0.y = 0; 113 113 wparams.rect.p1.x = 40; 114 wparams.rect.p1.y = 10;114 wparams.rect.p1.y = 9; 115 115 } else { 116 116 wparams.rect.p0.x = 0; … … 139 139 if (ui_is_textmode(ui)) { 140 140 rect.p0.x = 3; 141 rect.p0.y = 3;141 rect.p0.y = 2; 142 142 rect.p1.x = 17; 143 rect.p1.y = 4;143 rect.p1.y = 3; 144 144 } else { 145 145 rect.p0.x = 10; … … 164 164 if (ui_is_textmode(ui)) { 165 165 rect.p0.x = 3; 166 rect.p0.y = 5;166 rect.p0.y = 4; 167 167 rect.p1.x = 37; 168 rect.p1.y = 6;168 rect.p1.y = 5; 169 169 } else { 170 170 rect.p0.x = 10; … … 192 192 if (ui_is_textmode(ui)) { 193 193 rect.p0.x = 10; 194 rect.p0.y = 7;194 rect.p0.y = 6; 195 195 rect.p1.x = 20; 196 rect.p1.y = 8;196 rect.p1.y = 7; 197 197 } else { 198 198 rect.p0.x = 55; … … 222 222 if (ui_is_textmode(ui)) { 223 223 rect.p0.x = 22; 224 rect.p0.y = 7;224 rect.p0.y = 6; 225 225 rect.p1.x = 32; 226 rect.p1.y = 8;226 rect.p1.y = 7; 227 227 } else { 228 228 rect.p0.x = 155; -
uspace/lib/ui/src/msgdialog.c
rb79c91cc r45004f3 103 103 wparams.rect.p0.x = 0; 104 104 wparams.rect.p0.y = 0; 105 wparams.rect.p1.x = 20;105 wparams.rect.p1.x = 40; 106 106 wparams.rect.p1.y = 7; 107 107 } else { -
uspace/lib/ui/src/resource.c
rb79c91cc r45004f3 368 368 goto error; 369 369 370 rc = gfx_color_new_ega(0x 1f, &tbar_act_bg_color);371 if (rc != EOK) 372 goto error; 373 374 rc = gfx_color_new_ega(0x 1e, &tbar_act_text_color);370 rc = gfx_color_new_ega(0x70, &tbar_act_bg_color); 371 if (rc != EOK) 372 goto error; 373 374 rc = gfx_color_new_ega(0x70, &tbar_act_text_color); 375 375 if (rc != EOK) 376 376 goto error; -
uspace/lib/ui/src/wdecor.c
rb79c91cc r45004f3 61 61 wdecor_edge_h = 4, 62 62 wdecor_tbar_h = 22, 63 wdecor_tbar_h_text = 1,64 63 wdecor_frame_w = 4, 65 64 wdecor_frame_w_text = 1 … … 170 169 gfx_rect_t rect; 171 170 gfx_rect_t trect; 171 gfx_rect_t text_rect; 172 172 gfx_text_fmt_t fmt; 173 173 gfx_coord2_t pos; … … 207 207 if (rc != EOK) 208 208 return rc; 209 210 rc = gfx_set_color(wdecor->res->gc, wdecor->active ? 211 wdecor->res->tbar_act_bg_color : 212 wdecor->res->tbar_inact_bg_color); 213 if (rc != EOK) 214 return rc; 215 216 rc = gfx_fill_rect(wdecor->res->gc, &trect); 217 if (rc != EOK) 218 return rc; 209 219 } 210 211 rc = gfx_set_color(wdecor->res->gc, wdecor->active ?212 wdecor->res->tbar_act_bg_color :213 wdecor->res->tbar_inact_bg_color);214 if (rc != EOK)215 return rc;216 217 rc = gfx_fill_rect(wdecor->res->gc, &trect);218 if (rc != EOK)219 return rc;220 220 221 221 gfx_text_fmt_init(&fmt); … … 229 229 pos.y = (trect.p0.y + trect.p1.y) / 2; 230 230 231 if (wdecor->res->textmode) { 232 /* Make space around caption text */ 233 gfx_text_rect(wdecor->res->font, &pos, &fmt, 234 wdecor->caption, &text_rect); 235 236 /* Only make space if caption is non-empty */ 237 if (text_rect.p0.x < text_rect.p1.x) { 238 text_rect.p0.x -= 1; 239 text_rect.p1.x += 1; 240 } 241 242 rc = gfx_set_color(wdecor->res->gc, wdecor->active ? 243 wdecor->res->tbar_act_bg_color : 244 wdecor->res->tbar_inact_bg_color); 245 if (rc != EOK) 246 return rc; 247 248 rc = gfx_fill_rect(wdecor->res->gc, &text_rect); 249 if (rc != EOK) 250 return rc; 251 } 252 231 253 rc = gfx_puttext(wdecor->res->font, &pos, &fmt, wdecor->caption); 232 254 if (rc != EOK) … … 300 322 { 301 323 gfx_coord_t frame_w; 302 gfx_coord_t tbar_h;303 324 304 325 /* Does window have a frame? */ … … 317 338 /* Does window have a title bar? */ 318 339 if ((wdecor->style & ui_wds_titlebar) != 0) { 319 tbar_h = wdecor->res->textmode ? 320 wdecor_tbar_h_text : wdecor_tbar_h; 321 322 geom->title_bar_rect.p0 = geom->interior_rect.p0; 323 geom->title_bar_rect.p1.x = geom->interior_rect.p1.x; 324 geom->title_bar_rect.p1.y = geom->interior_rect.p0.y + tbar_h; 340 if (wdecor->res->textmode) { 341 geom->title_bar_rect.p0 = wdecor->rect.p0; 342 geom->title_bar_rect.p1.x = wdecor->rect.p1.x; 343 geom->title_bar_rect.p1.y = wdecor->rect.p0.y + 1; 344 } else { 345 geom->title_bar_rect.p0 = geom->interior_rect.p0; 346 geom->title_bar_rect.p1.x = geom->interior_rect.p1.x; 347 geom->title_bar_rect.p1.y = geom->interior_rect.p0.y 348 + wdecor_tbar_h; 349 } 325 350 326 351 geom->app_area_rect.p0.x = geom->interior_rect.p0.x;
Note:
See TracChangeset
for help on using the changeset viewer.