Changeset 294fc3cc in mainline
- Timestamp:
- 2021-09-25T18:47:29Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45b7d4d
- Parents:
- c1c7c20
- Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/edit/edit.c
rc1c7c20 r294fc3cc 156 156 static pane_t pane; 157 157 158 static sysarg_t scr_rows;159 static sysarg_t scr_columns;160 161 158 #define ROW_BUF_SIZE 4096 162 159 #define BUF_SIZE 64 … … 269 266 (void) pane_row_display; 270 267 271 // console_get_size(con, &scr_columns, &scr_rows);272 scr_columns = 80;273 scr_rows = 25;274 275 pane.rows = scr_rows - 1;276 pane.columns = scr_columns;277 268 pane.sh_row = 1; 278 269 pane.sh_column = 1; … … 310 301 /* Move to beginning of file. */ 311 302 pt_get_sof(&sof); 312 caret_move(sof, true, true);313 303 314 304 /* Create UI */ … … 316 306 if (rc != EOK) 317 307 return 1; 308 309 caret_move(sof, true, true); 318 310 319 311 /* Initial display */ … … 363 355 ui_wnd_params_init(¶ms); 364 356 params.caption = "Text Editor"; 365 params.rect.p0.x = 0; 366 params.rect.p0.y = 0; 367 params.rect.p1.x = 80; 368 params.rect.p1.y = 25; 357 params.style &= ~ui_wds_decorated; 358 params.placement = ui_wnd_place_full_screen; 369 359 370 360 rc = ui_window_create(edit->ui, ¶ms, &edit->window); … … 1291 1281 /* If it already fits, we're done */ 1292 1282 n = str_width(text); 1293 if ( n <= scr_columns - 2)1283 if ((int)n <= pane->columns - 2) 1294 1284 break; 1295 1285 1296 1286 /* Compute number of excess characters */ 1297 nextra = n - ( scr_columns - 2);1287 nextra = n - (pane->columns - 2); 1298 1288 /** With of the file name part */ 1299 1289 fnw = str_width(fname); -
uspace/lib/ui/src/window.c
rc1c7c20 r294fc3cc 256 256 } else if (ui->console != NULL) { 257 257 gc = console_gc_get_ctx(ui->cgc); 258 259 if (params->placement == ui_wnd_place_full_screen) { 260 /* Make window the size of the screen */ 261 gfx_rect_dims(&ui->rect, &scr_dims); 262 gfx_coord2_add(&dparams.rect.p0, &scr_dims, 263 &dparams.rect.p1); 264 } 258 265 } else { 259 266 /* Needed for unit tests */ … … 275 282 276 283 /* Move rectangle so that top-left corner is 0,0 */ 277 gfx_rect_rtranslate(& params->rect.p0, ¶ms->rect, &bparams.rect);284 gfx_rect_rtranslate(&dparams.rect.p0, &dparams.rect, &bparams.rect); 278 285 279 286 rc = gfx_bitmap_create(gc, &bparams, NULL, &bmp);
Note:
See TracChangeset
for help on using the changeset viewer.