Old 5th November 2018, 14:32   #1
asm
Junior Member
 
Join Date: Nov 2018
Posts: 8
InstallOptionsEx & Colours

I'm creating a new installer based on this:

https://github.com/Drizin/NsisMultiU...s/UMUI_Ex_Full

I am following the UltraModernUI docs for custom pages, but I end up with a grey background on my labels and an incorrect colour for the text. The background colour for the page as a whole is correct.

- I am using:

code:
!define UMUI_USE_INSTALLOPTIONSEX
!define UMUI_SKIN SoftBrown
!define UMUI_NO_BUTTONIMAGE
!define UMUI_XPSTYLE on



- I init from my INI using
code:
MUI_INSTALLOPTIONS_EXTRACT_AS

- My INI is simple with Text and Label fields
- I am using
code:
MUI_INSTALLOPTIONS_DISPLAY


If I understand the docs, using MUI_INSTALLOPTIONS_DISPLAY should set all the colours correctly.



(In fact when I zoom in like that it looks like it might be using the right colour for the text and then overwriting it?)

What am I missing?

Thank you!

- Andy
asm is offline   Reply With Quote
Old 5th November 2018, 16:03   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,088
Quote:
Originally Posted by asm View Post

(In fact when I zoom in like that it looks like it might be using the right colour for the text and then overwriting it?)
That is probably just anti-aliasing/cleartype.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 6th November 2018, 12:11   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,088
Have you tried using SetCtlColors to set the label background to transparent?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 6th November 2018, 12:24   #4
asm
Junior Member
 
Join Date: Nov 2018
Posts: 8
I haven't yet. According to the "Using InstallOptions or InstallOptionsEx for custom pages" section of the UltraModernUI read me:

Quote:
You can call InstallOptions in the function defined with the Page or UninstPage command using the MUI_INSTALLOPTIONS_DISPLAY macro. This macro skin automatically your custom pages. It can also automatically convert, on the fly, your custom InstallOptions INI into an InstallOptionsEx INI.
(Although I don't really understand what it means by converting the INI.)

Otherwise I have to do a whole bunch of stuff manually:

Quote:
Contrary to the MUI_INSTALLOPTIONS_DISPLAY macro, These one can't skin automatically your pages and you need to apply manually the text color and background color to all fields:

I was hoping I was just doing something wrong and wouldn't have to resort to all that...
asm is offline   Reply With Quote
Old 6th November 2018, 15:07   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,088
InstallOptionsEx is a 3rd-party plug-in and I'm guessing UMUI uses it. I have never used InstallOptionsEx nor UMUI so I don't really know.

You could automate the calls to SetCtlColors. The .ini knows how many controls there are and which type of control it is so it should be easy to create a loop that changes only the labels.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 6th November 2018, 15:12   #6
nickdollahz
Junior Member
 
Join Date: Apr 2018
Posts: 11
Cool

Something I can contribute to finally!

Can you post an example?
It appears to work for me. Although it has been a bit since I used IOEx and UMUI.

I have attached a minimal example that I tested and it seems to be working.
Attached Files
File Type: zip UMUIAutoSkinIOEx.zip (317.4 KB, 88 views)
nickdollahz is offline   Reply With Quote
Old 6th November 2018, 21:03   #7
asm
Junior Member
 
Join Date: Nov 2018
Posts: 8
Thanks Nick - your example does in fact work for me.

I will try to ferret out the difference between yours and mine, but that helps!
asm is offline   Reply With Quote
Old 6th November 2018, 21:18   #8
asm
Junior Member
 
Join Date: Nov 2018
Posts: 8
Bingo!

The difference was my INI had a UTF-8 BOM. Once I removed that, it works properly.

Thanks again Nick!
asm is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
colour, installoptionsex

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump