mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
Remove default case and reformat switch
This commit is contained in:
parent
1232ad1ada
commit
74e4f89ff2
1 changed files with 37 additions and 38 deletions
|
|
@ -23,8 +23,7 @@ font_to_pango_desc(struct font *font)
|
||||||
if (font->slant == FONT_SLANT_OBLIQUE) {
|
if (font->slant == FONT_SLANT_OBLIQUE) {
|
||||||
pango_font_description_set_style(desc, PANGO_STYLE_OBLIQUE);
|
pango_font_description_set_style(desc, PANGO_STYLE_OBLIQUE);
|
||||||
}
|
}
|
||||||
switch (font->weight)
|
switch (font->weight) {
|
||||||
{
|
|
||||||
case FONT_WEIGHT_THIN:
|
case FONT_WEIGHT_THIN:
|
||||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_THIN);
|
pango_font_description_set_weight(desc, PANGO_WEIGHT_THIN);
|
||||||
break;
|
break;
|
||||||
|
|
@ -40,6 +39,9 @@ font_to_pango_desc(struct font *font)
|
||||||
case FONT_WEIGHT_BOOK:
|
case FONT_WEIGHT_BOOK:
|
||||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_BOOK);
|
pango_font_description_set_weight(desc, PANGO_WEIGHT_BOOK);
|
||||||
break;
|
break;
|
||||||
|
case FONT_WEIGHT_NORMAL:
|
||||||
|
pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);
|
||||||
|
break;
|
||||||
case FONT_WEIGHT_MEDIUM:
|
case FONT_WEIGHT_MEDIUM:
|
||||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_MEDIUM);
|
pango_font_description_set_weight(desc, PANGO_WEIGHT_MEDIUM);
|
||||||
break;
|
break;
|
||||||
|
|
@ -58,9 +60,6 @@ font_to_pango_desc(struct font *font)
|
||||||
case FONT_WEIGHT_ULTRAHEAVY:
|
case FONT_WEIGHT_ULTRAHEAVY:
|
||||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_ULTRAHEAVY);
|
pango_font_description_set_weight(desc, PANGO_WEIGHT_ULTRAHEAVY);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue