Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-12pba
comparison draw.c @ 9:bc03b37b37ba
move command mode text to the left, next to the layout icon
author | paulo@thepaulopc |
---|---|
date | Wed, 15 Jun 2011 23:27:32 -0700 |
parents | 0968b3739b8d |
children | da0e0496f75b |
comparison
equal
deleted
inserted
replaced
2:c60b8f9d8d59 | 3:7b178d0d327e |
---|---|
70 } | 70 } |
71 dc.w = blw; | 71 dc.w = blw; |
72 drawtext(lt->symbol, dc.norm); | 72 drawtext(lt->symbol, dc.norm); |
73 x = dc.x + dc.w; | 73 x = dc.x + dc.w; |
74 | 74 |
75 char *_stext = stext; | |
76 if (getkeymode() == COMMANDMODE) { | 75 if (getkeymode() == COMMANDMODE) { |
77 strcpy(cmtext, "-- CMD -- "); | 76 const char *_cmtext = "-- CMD --"; |
78 strncat(cmtext, stext, sizeof cmtext - 1 - strlen(cmtext)); | 77 dc.w = textw(_cmtext); |
79 _stext = cmtext; | 78 dc.x = x; |
79 drawtext(_cmtext, dc.norm); | |
80 x = dc.x + dc.w; | |
80 } | 81 } |
81 dc.w = textw(_stext); | 82 |
83 dc.w = textw(stext); | |
82 dc.x = sw - dc.w; | 84 dc.x = sw - dc.w; |
83 if(dc.x < x) { | 85 if(dc.x < x) { |
84 dc.x = x; | 86 dc.x = x; |
85 dc.w = sw - x; | 87 dc.w = sw - x; |
86 } | 88 } |
87 drawtext(_stext, dc.norm); | 89 drawtext(stext, dc.norm); |
88 | 90 |
89 if((dc.w = dc.x - x) > bh) { | 91 if((dc.w = dc.x - x) > bh) { |
90 dc.x = x; | 92 dc.x = x; |
91 drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm); | 93 drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm); |
92 } | 94 } |