mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2025-01-24 07:58:09 +01:00
Allow setting the font size to 0
This commit is contained in:
parent
b88b1b6302
commit
5218c04bc9
1 changed files with 3 additions and 3 deletions
|
@ -33,10 +33,10 @@ struct cmd_results *cmd_font(int argc, char **argv) {
|
||||||
return cmd_results_new(CMD_FAILURE, "Invalid font family.");
|
return cmd_results_new(CMD_FAILURE, "Invalid font family.");
|
||||||
}
|
}
|
||||||
|
|
||||||
const gint size = pango_font_description_get_size(font_description);
|
const PangoFontMask flags = pango_font_description_get_set_fields(font_description);
|
||||||
if (size == 0) {
|
if ((flags & PANGO_FONT_MASK_SIZE) == 0) {
|
||||||
pango_font_description_free(font_description);
|
pango_font_description_free(font_description);
|
||||||
return cmd_results_new(CMD_FAILURE, "Invalid font size.");
|
return cmd_results_new(CMD_FAILURE, "Font size not given.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config->font_description != NULL) {
|
if (config->font_description != NULL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue