diff options
Diffstat (limited to 'source/blender/editors/interface/interface_style.cc')
-rw-r--r-- | source/blender/editors/interface/interface_style.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_style.cc b/source/blender/editors/interface/interface_style.cc index 3895a687033..9493f40548d 100644 --- a/source/blender/editors/interface/interface_style.cc +++ b/source/blender/editors/interface/interface_style.cc @@ -319,20 +319,20 @@ const uiStyle *UI_style_get_dpi(void) _style = *style; - _style.paneltitle.shadx = (short)(UI_DPI_FAC * _style.paneltitle.shadx); - _style.paneltitle.shady = (short)(UI_DPI_FAC * _style.paneltitle.shady); - _style.grouplabel.shadx = (short)(UI_DPI_FAC * _style.grouplabel.shadx); - _style.grouplabel.shady = (short)(UI_DPI_FAC * _style.grouplabel.shady); - _style.widgetlabel.shadx = (short)(UI_DPI_FAC * _style.widgetlabel.shadx); - _style.widgetlabel.shady = (short)(UI_DPI_FAC * _style.widgetlabel.shady); - - _style.columnspace = (short)(UI_DPI_FAC * _style.columnspace); - _style.templatespace = (short)(UI_DPI_FAC * _style.templatespace); - _style.boxspace = (short)(UI_DPI_FAC * _style.boxspace); - _style.buttonspacex = (short)(UI_DPI_FAC * _style.buttonspacex); - _style.buttonspacey = (short)(UI_DPI_FAC * _style.buttonspacey); - _style.panelspace = (short)(UI_DPI_FAC * _style.panelspace); - _style.panelouter = (short)(UI_DPI_FAC * _style.panelouter); + _style.paneltitle.shadx = short(UI_DPI_FAC * _style.paneltitle.shadx); + _style.paneltitle.shady = short(UI_DPI_FAC * _style.paneltitle.shady); + _style.grouplabel.shadx = short(UI_DPI_FAC * _style.grouplabel.shadx); + _style.grouplabel.shady = short(UI_DPI_FAC * _style.grouplabel.shady); + _style.widgetlabel.shadx = short(UI_DPI_FAC * _style.widgetlabel.shadx); + _style.widgetlabel.shady = short(UI_DPI_FAC * _style.widgetlabel.shady); + + _style.columnspace = short(UI_DPI_FAC * _style.columnspace); + _style.templatespace = short(UI_DPI_FAC * _style.templatespace); + _style.boxspace = short(UI_DPI_FAC * _style.boxspace); + _style.buttonspacex = short(UI_DPI_FAC * _style.buttonspacex); + _style.buttonspacey = short(UI_DPI_FAC * _style.buttonspacey); + _style.panelspace = short(UI_DPI_FAC * _style.panelspace); + _style.panelouter = short(UI_DPI_FAC * _style.panelouter); return &_style; } @@ -340,7 +340,7 @@ const uiStyle *UI_style_get_dpi(void) int UI_fontstyle_string_width(const uiFontStyle *fs, const char *str) { UI_fontstyle_set(fs); - return (int)BLF_width(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); + return int(BLF_width(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX)); } int UI_fontstyle_string_width_with_block_aspect(const uiFontStyle *fs, @@ -359,7 +359,7 @@ int UI_fontstyle_string_width_with_block_aspect(const uiFontStyle *fs, if (aspect != 1.0f) { /* While in most cases rounding up isn't important, it can make a difference * with small fonts (3px or less), zooming out in the node-editor for e.g. */ - width = (int)ceilf(width * aspect); + width = int(ceilf(width * aspect)); } return width; } |