mirror of
https://github.com/labwc/labwc.git
synced 2026-06-08 03:02:20 -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) {
|
||||
pango_font_description_set_style(desc, PANGO_STYLE_OBLIQUE);
|
||||
}
|
||||
switch (font->weight)
|
||||
{
|
||||
switch (font->weight) {
|
||||
case FONT_WEIGHT_THIN:
|
||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_THIN);
|
||||
break;
|
||||
|
|
@ -40,6 +39,9 @@ font_to_pango_desc(struct font *font)
|
|||
case FONT_WEIGHT_BOOK:
|
||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_BOOK);
|
||||
break;
|
||||
case FONT_WEIGHT_NORMAL:
|
||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);
|
||||
break;
|
||||
case FONT_WEIGHT_MEDIUM:
|
||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_MEDIUM);
|
||||
break;
|
||||
|
|
@ -58,9 +60,6 @@ font_to_pango_desc(struct font *font)
|
|||
case FONT_WEIGHT_ULTRAHEAVY:
|
||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_ULTRAHEAVY);
|
||||
break;
|
||||
default:
|
||||
pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);
|
||||
break;
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue