mirror of
https://git.planet-casio.com/Lephenixnoir/JustUI.git
synced 2025-01-01 14:33:37 +01:00
jfkeys: parameterize width to better fit on fx-CP display
This commit is contained in:
parent
7f2131d6a0
commit
e12a58c1f0
1 changed files with 5 additions and 2 deletions
|
@ -117,8 +117,11 @@ static void jfkeys_poly_render(void *f0, int base_x, int y)
|
||||||
if(!text || (*text != '.' && *text != '/' && *text != '@'
|
if(!text || (*text != '.' && *text != '/' && *text != '@'
|
||||||
&& *text != '#')) continue;
|
&& *text != '#')) continue;
|
||||||
|
|
||||||
int x = base_x + 4 + 65 * position;
|
int fw = jwidget_full_width(f);
|
||||||
int w = 63;
|
int margin = (fw >= 250 ? 4 : 2);
|
||||||
|
int spacing = 2;
|
||||||
|
int w = (fw - 2 * margin - 5 * spacing) / 6;
|
||||||
|
int x = base_x + margin + (w + spacing) * position;
|
||||||
int color = (text[0] == '#') ? f->text_special_color : f->text_color;
|
int color = (text[0] == '#') ? f->text_special_color : f->text_color;
|
||||||
|
|
||||||
if(text[0] == '.') {
|
if(text[0] == '.') {
|
||||||
|
|
Loading…
Reference in a new issue