Ignore:
File:
1 edited

Legend:

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

    r10cb47e r395ca2e  
    8585        lbl->confirm = on_confirm;
    8686        lbl->cancel = on_cancel;
    87         bool initialized = init_label(&lbl->label, parent, NULL, caption,
    88             points, background, foreground);
     87        bool initialized = init_label(
     88            &lbl->label, parent, caption, points, background, foreground);
    8989        lbl->label.widget.destroy = my_label_destroy;
    9090        return initialized;
     
    110110{
    111111        if (argc >= 2) {
    112                 window_t *main_window = window_open(argv[1], NULL,
    113                     WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, "vdemo");
     112                window_t *main_window = window_open(argv[1], true, true, "vdemo", 0, 0);
    114113                if (!main_window) {
    115114                        printf("Cannot open main window.\n");
     
    118117
    119118                pixel_t grd_bg = PIXEL(255, 240, 240, 240);
    120                
    121                 pixel_t btn_bg = PIXEL(255, 240, 240, 240);
    122                 pixel_t btn_fg = PIXEL(255, 186, 186, 186);
    123                 pixel_t btn_text = PIXEL(255, 0, 0, 0);
    124                
     119                pixel_t btn_bg = PIXEL(255, 0, 0, 0);
     120                pixel_t btn_fg = PIXEL(255, 240, 240, 240);
    125121                pixel_t lbl_bg = PIXEL(255, 240, 240, 240);
    126                 pixel_t lbl_text = PIXEL(255, 0, 0, 0);
     122                pixel_t lbl_fg = PIXEL(255, 0, 0, 0);
    127123
    128                 my_label_t *lbl_action = create_my_label(NULL, "Hello there!", 16,
    129                     lbl_bg, lbl_text);
    130                 button_t *btn_confirm = create_button(NULL, NULL, "Confirm", 16,
    131                     btn_bg, btn_fg, btn_text);
    132                 button_t *btn_cancel = create_button(NULL, NULL, "Cancel", 16,
    133                     btn_bg, btn_fg, btn_text);
    134                 grid_t *grid = create_grid(window_root(main_window), NULL, 2, 2,
    135                     grd_bg);
     124                my_label_t *lbl_action = create_my_label(NULL, "Hello there!", 16, lbl_bg, lbl_fg);
     125                button_t *btn_confirm = create_button(NULL, "Confirm", 16, btn_bg, btn_fg);
     126                button_t *btn_cancel = create_button(NULL, "Cancel", 16, btn_bg, btn_fg);
     127                grid_t *grid = create_grid(window_root(main_window), 2, 2, grd_bg);
    136128                if (!lbl_action || !btn_confirm || !btn_cancel || !grid) {
    137129                        window_close(main_window);
     
    152144                grid->add(grid, &btn_confirm->widget, 0, 1, 1, 1);
    153145                grid->add(grid, &btn_cancel->widget, 1, 1, 1, 1);
    154                 window_resize(main_window, 0, 0, 200, 76,
    155                     WINDOW_PLACEMENT_CENTER);
     146                window_resize(main_window, 200, 76);
    156147
    157148                window_exec(main_window);
Note: See TracChangeset for help on using the changeset viewer.