mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-07-13 06:24:29 +02:00
Make font selection scheme specific
Add the members font and font_descriptor to struct clr_scheme, so that it is possible to specify a font for each scheme. During initialization create the font descriptors for each scheme. Instead of initially setting the font descriptor when setting up the buffer, set the font descriptor when drawing the text. Signed-off-by: Frank Oltmanns <frank@oltmanns.dev> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
committed by
Maarten van Gompel
parent
6e52be343d
commit
d6439afcb9
@ -1,7 +1,7 @@
|
||||
#ifndef config_def_h_INCLUDED
|
||||
#define config_def_h_INCLUDED
|
||||
|
||||
static const char *default_font = "Sans 14";
|
||||
#define DEFAULT_FONT "Sans 14"
|
||||
static const int transparency = 255;
|
||||
|
||||
struct clr_scheme schemes[] = {
|
||||
@ -12,6 +12,7 @@ struct clr_scheme schemes[] = {
|
||||
.high = {.bgra = {100, 100, 100, transparency}},
|
||||
.swipe = {.bgra = {100, 255, 100, 64}},
|
||||
.text = {.color = UINT32_MAX},
|
||||
.font = DEFAULT_FONT,
|
||||
},
|
||||
{
|
||||
/* colors */
|
||||
@ -20,6 +21,7 @@ struct clr_scheme schemes[] = {
|
||||
.high = {.bgra = {100, 100, 100, transparency}},
|
||||
.swipe = {.bgra = {100, 255, 100, 64}},
|
||||
.text = {.color = UINT32_MAX},
|
||||
.font = DEFAULT_FONT,
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user