diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-05-11 16:01:50 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-05-11 16:01:50 +0200 |
commit | e8f0f8faa8d5f1b74dd6a8c9ab976798ea8b84ae (patch) | |
tree | 00067a5d7d06a8bd6d3163ae6889a4372c1f19c1 /demos | |
parent | 50257722605df92ab57f42317fc2e97f7fd05f9a (diff) | |
download | uGFX-e8f0f8faa8d5f1b74dd6a8c9ab976798ea8b84ae.tar.gz uGFX-e8f0f8faa8d5f1b74dd6a8c9ab976798ea8b84ae.tar.bz2 uGFX-e8f0f8faa8d5f1b74dd6a8c9ab976798ea8b84ae.zip |
Improving look of GWIN widget demo
Diffstat (limited to 'demos')
-rw-r--r-- | demos/modules/gwin/widgets/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c index 3d8d7624..376ad3bd 100644 --- a/demos/modules/gwin/widgets/main.c +++ b/demos/modules/gwin/widgets/main.c @@ -156,8 +156,8 @@ static void createWidgets(void) { // Create the Pages wi.g.show = FALSE; - wi.g.x = 0; wi.g.y += 5; - wi.g.width = ScrWidth/2; wi.g.height = ScrHeight-wi.g.y; + wi.g.x = 5; wi.g.y += 5; + wi.g.width = ScrWidth/2 - 10; wi.g.height = ScrHeight-wi.g.y-5; ghPgButtons = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER); ghPgSliders = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER); ghPgCheckboxes = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER); @@ -191,16 +191,20 @@ static void createWidgets(void) { wi.g.width = gwinGetInnerWidth(ghPgSliders) - 10; wi.g.height = SLIDER_WIDTH; wi.g.x = 5; wi.g.y = 5; wi.text = "S1"; ghSlider1 = gwinSliderCreate(0, &wi); + gwinSliderSetPosition(ghSlider1, 33); wi.g.y += wi.g.height + 1; wi.text = "S2"; ghSlider2 = gwinSliderCreate(0, &wi); + gwinSliderSetPosition(ghSlider2, 86); // Vertical Sliders wi.g.y += wi.g.height + 5; wi.g.width = SLIDER_WIDTH; wi.g.height = gwinGetInnerHeight(ghPgSliders) - 5 - wi.g.y; wi.g.x = 5; wi.text = "S3"; ghSlider3 = gwinSliderCreate(0, &wi); + gwinSliderSetPosition(ghSlider3, 13); wi.g.x += wi.g.width+1; wi.text = "S4"; ghSlider4 = gwinSliderCreate(0, &wi); + gwinSliderSetPosition(ghSlider4, 76); // Checkboxes - for the 2nd checkbox we apply special drawing before making it visible wi.g.parent = ghPgCheckboxes; |