diff options
author | Andrey Nazarov <skuller@skuller.net> | 2011-02-09 19:10:58 +0300 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2011-02-09 19:10:58 +0300 |
commit | 608c45df70fcd94e431c93bf04a0bac9e76bbf49 (patch) | |
tree | d7b5a042d9e79616a544e8cf81698c7033757c0a /src/ui_demos.c | |
parent | 0ea2bb843c9d5af80a9cec62adfbcc3d42aefb9e (diff) |
Use CHAR_WIDTH/HEIGHT constants everywhere.
Diffstat (limited to 'src/ui_demos.c')
-rw-r--r-- | src/ui_demos.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ui_demos.c b/src/ui_demos.c index d0c2346..b28a001 100644 --- a/src/ui_demos.c +++ b/src/ui_demos.c @@ -378,21 +378,21 @@ static menuSound_t Sort( menuList_t *self, int column ) { } static void Size( menuFrameWork_t *self ) { - int w = uis.width * 96 / 640; + int w = uis.width * 8 / 640; - if( w > 8*15 ) { - w = 8*15; + if( w > 15 ) { + w = 15; } m_demos.list.generic.x = 0; - m_demos.list.generic.y = 8; + m_demos.list.generic.y = CHAR_HEIGHT; m_demos.list.generic.width = 0; - m_demos.list.generic.height = uis.height - 17; - - m_demos.list.columns[0].width = uis.width - 100 - w; - m_demos.list.columns[1].width = 40; - m_demos.list.columns[2].width = 60; - m_demos.list.columns[3].width = w; + m_demos.list.generic.height = uis.height - CHAR_HEIGHT*2 - 1; + + m_demos.list.columns[0].width = uis.width - ( 13 + w ) * CHAR_WIDTH; + m_demos.list.columns[1].width = 5*CHAR_WIDTH; + m_demos.list.columns[2].width = 8*CHAR_WIDTH; + m_demos.list.columns[3].width = w*CHAR_WIDTH; } static menuSound_t Keydown( menuFrameWork_t *self, int key ) { |