Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_splash_screen.c
| Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | static uiBlock *wm_block_create_splash(bContext *C, ARegion *region, void *UNUSED(arg)) | ||||
| * with the OS when the splash shows, window clipping in this case gives | * with the OS when the splash shows, window clipping in this case gives | ||||
| * ugly results and clipping the splash isn't useful anyway, just disable it [#32938] */ | * ugly results and clipping the splash isn't useful anyway, just disable it [#32938] */ | ||||
| UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP); | UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP); | ||||
| UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_POPUP); | UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_POPUP); | ||||
| /* Size before dpi scaling (halved for hi-dpi image). */ | /* Size before dpi scaling (halved for hi-dpi image). */ | ||||
| int ibuf_unit_size[2]; | int ibuf_unit_size[2]; | ||||
| ImBuf *ibuf = wm_block_splash_image(ibuf_unit_size); | ImBuf *ibuf = wm_block_splash_image(ibuf_unit_size); | ||||
| but = uiDefBut(block, | but = uiDefButImage(block, | ||||
| UI_BTYPE_IMAGE, | ibuf, | ||||
| 0, | |||||
| "", | |||||
| 0, | 0, | ||||
| 0.5f * U.widget_unit, | 0.5f * U.widget_unit, | ||||
| U.dpi_fac * ibuf_unit_size[0], | U.dpi_fac * ibuf_unit_size[0], | ||||
| U.dpi_fac * ibuf_unit_size[1], | U.dpi_fac * ibuf_unit_size[1], | ||||
| /* Button owns the imbuf now. */ | NULL); | ||||
| ibuf, | |||||
| 0.0, | |||||
| 0.0, | |||||
| 0, | |||||
| 0, | |||||
| ""); | |||||
| UI_but_func_set(but, wm_block_splash_close, block, NULL); | UI_but_func_set(but, wm_block_splash_close, block, NULL); | ||||
| UI_block_func_set(block, wm_block_splash_refreshmenu, block, NULL); | UI_block_func_set(block, wm_block_splash_refreshmenu, block, NULL); | ||||
| int x = U.dpi_fac * (ibuf_unit_size[0] + 1); | int x = U.dpi_fac * (ibuf_unit_size[0] + 1); | ||||
| int y = U.dpi_fac * (ibuf_unit_size[1] - 13); | int y = U.dpi_fac * (ibuf_unit_size[1] - 13); | ||||
| wm_block_splash_add_labels(block, x, y); | wm_block_splash_add_labels(block, x, y); | ||||
| Show All 37 Lines | |||||