Changeset de0c55a in mainline
- Timestamp:
- 2021-08-13T22:37:12Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc52b5b
- Parents:
- 943f032
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/uidemo/uidemo.c
r943f032 rde0c55a 673 673 674 674 gfx_bitmap_params_init(&bparams); 675 bparams.rect.p0.x = 0; 676 bparams.rect.p0.y = 0; 677 bparams.rect.p1.x = 188; 678 bparams.rect.p1.y = 24; 675 if (ui_is_textmode(ui)) { 676 bparams.rect.p0.x = 0; 677 bparams.rect.p0.y = 0; 678 bparams.rect.p1.x = 40; 679 bparams.rect.p1.y = 2; 680 } else { 681 bparams.rect.p0.x = 0; 682 bparams.rect.p0.y = 0; 683 bparams.rect.p1.x = 188; 684 bparams.rect.p1.y = 24; 685 } 679 686 680 687 rc = gfx_bitmap_create(gc, &bparams, NULL, &bitmap); … … 692 699 } 693 700 694 off.x = 15; 695 off.y = 155; 701 if (ui_is_textmode(ui)) { 702 off.x = 20; 703 off.y = 10; 704 } else { 705 off.x = 15; 706 off.y = 155; 707 } 708 696 709 gfx_rect_translate(&off, &bparams.rect, &rect); 697 710 698 711 /* Adjust for frame width (2 x 1 pixel) */ 699 rect.p1.x += 2; 700 rect.p1.y += 2; 712 if (!ui_is_textmode(ui)) { 713 ui_image_set_flags(demo.image, ui_imgf_frame); 714 rect.p1.x += 2; 715 rect.p1.y += 2; 716 } 717 701 718 ui_image_set_rect(demo.image, &rect); 702 ui_image_set_flags(demo.image, ui_imgf_frame);703 719 704 720 rc = ui_fixed_add(demo.fixed, ui_image_ctl(demo.image)); … … 719 735 if (ui_is_textmode(ui)) { 720 736 rect.p0.x = 20; 721 rect.p0.y = 1 2;737 rect.p0.y = 13; 722 738 rect.p1.x = 40; 723 rect.p1.y = 1 3;739 rect.p1.y = 14; 724 740 } else { 725 741 rect.p0.x = 15; … … 728 744 rect.p1.y = 210; 729 745 } 746 730 747 ui_checkbox_set_rect(demo.checkbox, &rect); 731 748 … … 755 772 if (ui_is_textmode(ui)) { 756 773 rect.p0.x = 20; 757 rect.p0.y = 1 4;774 rect.p0.y = 15; 758 775 rect.p1.x = 40; 759 rect.p1.y = 1 5;776 rect.p1.y = 16; 760 777 } else { 761 778 rect.p0.x = 15; … … 782 799 if (ui_is_textmode(ui)) { 783 800 rect.p0.x = 20; 784 rect.p0.y = 1 5;801 rect.p0.y = 16; 785 802 rect.p1.x = 40; 786 rect.p1.y = 1 6;803 rect.p1.y = 17; 787 804 } else { 788 805 rect.p0.x = 15; … … 810 827 if (ui_is_textmode(ui)) { 811 828 rect.p0.x = 20; 812 rect.p0.y = 1 6;829 rect.p0.y = 17; 813 830 rect.p1.x = 40; 814 rect.p1.y = 1 7;831 rect.p1.y = 18; 815 832 } else { 816 833 rect.p0.x = 15; … … 838 855 if (ui_is_textmode(ui)) { 839 856 rect.p0.x = 20; 840 rect.p0.y = 1 8;857 rect.p0.y = 19; 841 858 rect.p1.x = 40; 842 rect.p1.y = 19;859 rect.p1.y = 20; 843 860 } else { 844 861 rect.p0.x = 15; … … 900 917 k = i * i + j * j; 901 918 pixelmap_put_pixel(&pixelmap, i, j, 902 PIXEL( 255, k, k, 255 - k));919 PIXEL(0, k, k, 255 - k)); 903 920 } 904 921 }
Note:
See TracChangeset
for help on using the changeset viewer.