Archive: Change top bitmap in modern ui


Change top bitmap in modern ui
Hi

is there a way to change the white bar (with the installer icon) on the top of the modern ui installers to a bitmap like in some installshield setups?

DOCa Cola

http://www.borgcore.de/outerspace/norton.png


I think I'll add an option for it to the Modern UI :)


cool, thx!


Modern UI 1.63 with header bitmap support and some other new features is ready.

I can't upload it now, because a stupid router somewhere is dead so I can't connect to SourceForge :(


yay, can't wait for it


From Homer Simpson:
Woohoo
:up:

Here is a screenshot. Still can't upload :(


nice!


Cool :up: Can we change the top text alignment? Center, right, left?


good idea
and something like toptext_left=200 (yep, not a very creative name :))


It's not possible to put an image behind the text, but you can put the bitmap on the left or right side.


But It'll be both... Header and SubHeader in modern UI


The header bitmap has a fixed size. With the default DPI, it has a width of 150 pixels, so the text does fit next to the image.

You can either put the image on the left size (text will be moved a bit to the right side) or on the right side.


Very cool Joost
That's very cool!
Can't wait for that
:D


Uploaded :D Grab the latest CVS version.


yay!


wouldn't it be better if the header bitmap can be used this way?

!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header.bmp"
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"

You don't have to define MUI_UI. The headerbitmap UI is an extension which will be used automatically.


yep, but it's then more complicated to use an custom made UI
or am i wrong?


I'll add an option to use a customized header UI with dialog IDD_INST.

edit: Done :)


erm, can you give me an example, pls? :)


!define MUI_UI "normal ui"
!define MUI_UI_HEADERBITMAP "ui with custom IDD_INST resource"


!define MUI_UI_HEADERBITMAP_RIGHT "ui with custom IDD_INST resource"

Use this if you want to use the header bitmap in the right.

(if you edited with the ${NSISDIR}\Contrib\UIs\modern-headerbmpr.exe")

[edit]And how about a option to allow use the icon and the bitmap at same time (and put the icon on the bitmap)?[/edit]


I know there i a way to make the background of a text label transparent (this is possible in visual basic and is also used in install shield).
if the bitmap in the dialog ressource is then arranged to be behind the two text labels then we can use bitmaps with the full width of the header and they do not cover the text labels anymore


Great job Joost!


NSIS does not support transparent labels.

This would be a nice feature for the future, but you would also need a possibility to resize the dialog control.

I think this won't be ready anytime soon, there is still a lot of stuff on the TODO list.


Nice work dude :up: :D


Great thing
Well, well, well
Great enhancement Major Dude!
:D Thx again (make things look smoother...)


Originally posted by Joost Verburg
This would be a nice feature for the future, but you would also need a possibility to resize the dialog control.
Sorry, which dialog control?

The bitmap control.


For the beginning it would not be necessary to integrate the custom size feature, because people can make their own custom header UIs with the bitmap size they need and the labels set to foreground through reshacker. Then the transparent label feature would be good for people who really need to customize the ui and can wait for the easier commands in the later builds.


Maybe a feature for transparency will be added to NSIS in the future.


Is it not just a matter of calling SetBkMode(dc,TRANSPARENT) ?


I'm not sure. I think you also have to respond to a message.


Yea, it must be in a message. There is already some partly transparent code for the MUI's branding text, I'll try to get a transparent text option out of it too.


The message you're thinking of is WM_CTLCOLORSTATIC

You probably want something like this:

case WM_CTLCOLORSTATIC:
{
HWND ctl = (HWND)lp;
HDC hdc = (HDC)wp;
if(ctl == APPROPRIATE_CONTROL)
SetBkMode(hdc, TRANSPARENT);
else
SetBkMode(hdc, OPAQUE);
return 0; // we're meant to return a brush, but this should
// get us a default
}

This didn't work quite right the one time I tried it, but that was on the PocketPC, where nothing works quite as it should :/


Sorry
Fist sorry my post.

Second: Cool. The bitmap is COOL.

Third: How I can use my own headbitmap?
I think, it is better, when I can make an own bitmap, which is right for the program I want to install, am I right?

So long,
raffiX, 15; Germany, NRW, Cologne


Check the Modern UI Readme:

Use MUI_HEADERIMAGE to enable the image and MUI_HEADERIMAGE_BITMAP to use a custom bitmap.

(Modern UI 1.67/1.68)


As I said, I'm quite to dumb for this :D I had Errors with MUI_HEADERIMAGE_BITMAP but I used a simple way which I used in InstallShield some time ago:

take your bitmap, and save it as
...\NSIS\Contrib\Graphics\Header\nsis.bmp

As me and my friends say: if you don't understand how to do it, try to find another way...

I know this isn't the best way and in fact not the way you mentioned, but it works well :)

so long -L-B-


It's a very simple setting:

!define MUI_HEADERIMAGE_BITMAP "yourbitmap.bmp"

No need to overwrite the default image file.


Archive: Change top bitmap in modern ui


Well, I'm trying to add a header bitmap with NSIS 2.0 RC4 and not having much success.

I do not get any bitmap with any of these:
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
!define MUI_HEADERIMAGE_BITMAP "nsis.bmp"

But with:
!define MUI_HEADERIMAGE
or
!define MUI_HEADERIMAGE "whatever.bmp"
I get the default nsis.bmp from the ${NSISDIR}\Contrib\Graphics\Header\ dir.

If I replace the default nsis.bmp with my own bmp my custom bmp works as well.

My custom bmp is 150x57 as required.


!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "whatever.bmp"


Oh, you mean I need both? Yup that solved it. But I just couldn't figure that out from the docs.