diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/datafiles/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/datafiles/SConscript | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_datafiles.h | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 17 |
4 files changed, 19 insertions, 3 deletions
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index 35a669175df..87f07acfb3e 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -47,6 +47,7 @@ if(WITH_BLENDER) # images data_to_c_simple(../../../../release/datafiles/splash.png SRC) + data_to_c_simple(../../../../release/datafiles/splash_2x.png SRC) # XXX These are handy, but give nasty "false changes" in svn :/ #svg_to_png(../../../../release/datafiles/blender_icons.svg #../../../../release/datafiles/blender_icons16.png diff --git a/source/blender/editors/datafiles/SConscript b/source/blender/editors/datafiles/SConscript index dadd4bd1f19..47819d0e33c 100644 --- a/source/blender/editors/datafiles/SConscript +++ b/source/blender/editors/datafiles/SConscript @@ -41,6 +41,7 @@ sources.extend(( os.path.join(env['DATA_SOURCES'], "bmonofont.ttf.c"), os.path.join(env['DATA_SOURCES'], "splash.png.c"), + os.path.join(env['DATA_SOURCES'], "splash_2x.png.c"), os.path.join(env['DATA_SOURCES'], "blender_icons16.png.c"), os.path.join(env['DATA_SOURCES'], "blender_icons32.png.c"), os.path.join(env['DATA_SOURCES'], "prvicons.png.c"), diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 81dbb8e9aa5..9022a1481aa 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -54,6 +54,9 @@ extern char datatoc_prvicons_png[]; extern int datatoc_splash_png_size; extern char datatoc_splash_png[]; +extern int datatoc_splash_2x_png_size; +extern char datatoc_splash_2x_png[]; + extern int datatoc_bfont_pfb_size; extern char datatoc_bfont_pfb[]; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index c02cc456a46..a7d8cba4d20 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1767,8 +1767,19 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar extern char datatoc_splash_png[]; extern int datatoc_splash_png_size; - ImBuf *ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png, - datatoc_splash_png_size, IB_rect, NULL, "<splash screen>"); + extern char datatoc_splash_2x_png[]; + extern int datatoc_splash_2x_png_size; + + ImBuf *ibuf; + + if (U.pixelsize == 2) { + ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_2x_png, + datatoc_splash_2x_png_size, IB_rect, NULL, "<splash screen>"); + } + else { + ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png, + datatoc_splash_png_size, IB_rect, NULL, "<splash screen>"); + } #else ImBuf *ibuf = NULL; #endif @@ -1797,7 +1808,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar * 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] */ uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP); - + /* XXX splash scales with pixelsize, should become widget-units */ but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize * 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */ uiButSetFunc(but, wm_block_splash_close, block, NULL); |