Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/hello/hello.c

    ra0aeb8f r68698ba  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2020 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    8080        ui_wnd_params_init(&params);
    8181        params.caption = "Hello World";
    82         if (ui_is_textmode(ui)) {
    83                 params.rect.p0.x = 0;
    84                 params.rect.p0.y = 0;
    85                 params.rect.p1.x = 24;
    86                 params.rect.p1.y = 5;
    87         } else {
    88                 params.rect.p0.x = 0;
    89                 params.rect.p0.y = 0;
    90                 params.rect.p1.x = 200;
    91                 params.rect.p1.y = 60;
    92         }
     82        params.rect.p0.x = 0;
     83        params.rect.p0.y = 0;
     84        params.rect.p1.x = 200;
     85        params.rect.p1.y = 60;
    9386
    9487        memset((void *) &hello, 0, sizeof(hello));
     
    118111        }
    119112
    120         ui_window_get_app_rect(window, &rect);
     113        rect.p0.x = 10;
     114        rect.p0.y = 35;
     115        rect.p1.x = 190;
     116        rect.p1.y = 50;
    121117        ui_label_set_rect(hello.label, &rect);
    122118        ui_label_set_halign(hello.label, gfx_halign_center);
    123         ui_label_set_valign(hello.label, gfx_valign_center);
    124119
    125120        rc = ui_fixed_add(hello.fixed, ui_label_ctl(hello.label));
Note: See TracChangeset for help on using the changeset viewer.