mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
menu: render submenu arrows
This commit is contained in:
parent
6a750d465e
commit
429df42a8f
6 changed files with 70 additions and 34 deletions
|
|
@ -28,9 +28,11 @@ int font_width(struct font *font, const char *string);
|
|||
* @text: text to be generated as texture
|
||||
* @font: font description
|
||||
* @color: foreground color in rgba format
|
||||
* @arrow: arrow (utf8) character to show or NULL for none
|
||||
*/
|
||||
void font_buffer_create(struct lab_data_buffer **buffer, int max_width,
|
||||
const char *text, struct font *font, float *color, double scale);
|
||||
const char *text, struct font *font, float *color, const char *arrow,
|
||||
double scale);
|
||||
|
||||
/**
|
||||
* font_finish - free some font related resources
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ struct scaled_font_buffer {
|
|||
char *text;
|
||||
int max_width;
|
||||
float color[4];
|
||||
char *arrow;
|
||||
struct font font;
|
||||
struct scaled_scene_buffer *scaled_buffer;
|
||||
};
|
||||
|
|
@ -44,6 +45,6 @@ struct scaled_font_buffer *scaled_font_buffer_create(struct wlr_scene_tree *pare
|
|||
* - font and color the same
|
||||
*/
|
||||
void scaled_font_buffer_update(struct scaled_font_buffer *self, const char *text,
|
||||
int max_width, struct font *font, float *color);
|
||||
int max_width, struct font *font, float *color, const char *arrow);
|
||||
|
||||
#endif /* __LAB_COMMON_SCALED_FONT_BUFFER_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue