diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 09:32:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:42:06 +0300 |
commit | aa60b9338ab679853d36322829458ccb7b4f06d0 (patch) | |
tree | df1b32fcb9285d6c272415e8aac57110a5b9f265 /source/blender/windowmanager | |
parent | b037816980dee7a74128c23eface983b9850d4a9 (diff) |
Cleanup: use 'const' style argument
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 8 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_splash_screen.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 4c96b03f333..c8c86ade07a 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -2818,7 +2818,7 @@ static uiBlock *block_create_autorun_warning(struct bContext *C, void *UNUSED(arg1)) { wmWindowManager *wm = CTX_wm_manager(C); - uiStyle *style = UI_style_get_dpi(); + const uiStyle *style = UI_style_get_dpi(); uiBlock *block = UI_block_begin(C, region, "autorun_warning_popup", UI_EMBOSS); UI_block_flag_enable( @@ -3056,7 +3056,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, { wmGenericCallback *post_action = (wmGenericCallback *)arg1; Main *bmain = CTX_data_main(C); - uiStyle *style = UI_style_get_dpi(); + const uiStyle *style = UI_style_get_dpi(); const int dialog_width = U.widget_unit * 22; const short icon_size = 64 * U.dpi_fac; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 93ba5016ed7..1bd98cdc996 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1319,7 +1319,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *region, void *arg_op) wmOperator *op = arg_op; uiBlock *block; uiLayout *layout; - uiStyle *style = UI_style_get_dpi(); + const uiStyle *style = UI_style_get_dpi(); int width = 15 * UI_UNIT_X; block = UI_block_begin(C, region, __func__, UI_EMBOSS); @@ -1401,7 +1401,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *userD wmOperator *op = data->op; uiBlock *block; uiLayout *layout; - uiStyle *style = UI_style_get_dpi(); + const uiStyle *style = UI_style_get_dpi(); block = UI_block_begin(C, region, __func__, UI_EMBOSS); UI_block_flag_disable(block, UI_BLOCK_LOOP); @@ -1450,7 +1450,7 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *region, void *userDa wmOperator *op = data->op; uiBlock *block; uiLayout *layout; - uiStyle *style = UI_style_get_dpi(); + const uiStyle *style = UI_style_get_dpi(); block = UI_block_begin(C, region, __func__, UI_EMBOSS); UI_block_flag_disable(block, UI_BLOCK_LOOP); @@ -2308,7 +2308,7 @@ static void radial_control_paint_curve(uint pos, Brush *br, float radius, int li static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void *customdata) { RadialControl *rc = customdata; - uiStyle *style = UI_style_get(); + const uiStyle *style = UI_style_get(); const uiFontStyle *fstyle = &style->widget; const int fontid = fstyle->uifont_id; short fstyle_points = fstyle->points; diff --git a/source/blender/windowmanager/intern/wm_splash_screen.c b/source/blender/windowmanager/intern/wm_splash_screen.c index 6e77cb23ed3..dcf09e9cbc5 100644 --- a/source/blender/windowmanager/intern/wm_splash_screen.c +++ b/source/blender/windowmanager/intern/wm_splash_screen.c @@ -81,7 +81,7 @@ static void wm_block_splash_add_label(uiBlock *block, const char *label, int x, return; } - uiStyle *style = UI_style_get(); + const uiStyle *style = UI_style_get(); BLF_size(style->widgetlabel.uifont_id, style->widgetlabel.points, U.pixelsize * U.dpi); int label_width = BLF_width(style->widgetlabel.uifont_id, label, strlen(label)); @@ -259,7 +259,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *region, void *UNUSE { uiBlock *block; uiBut *but; - uiStyle *style = UI_style_get_dpi(); + const uiStyle *style = UI_style_get_dpi(); block = UI_block_begin(C, region, "splash", UI_EMBOSS); |