IzPack

Heading Image on Left

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 3.11.0
  • Fix Version/s: 4.0.0
  • Component/s: Installer
  • Labels:
    None
  • Number of attachments :
    0

Description

I have a branding need to display the header image on the left rather than the default right side.

Activity

Hide
Julien Ponge added a comment -

Feel free to add an option that puts it on the left side.

Show
Julien Ponge added a comment - Feel free to add an option that puts it on the left side.
Hide
Jeff Gordon added a comment -

In InstallerFrame I have added an instance variable "imageLeft" which is false by default.

In createHeading() we look for the modifier key headingImageOnLeft:

<guiprefs width="600" height="480" resizable="no">
<modifier key="useHeadingPanel" value="yes"/>
<modifier key="useHeadingForSummary" value="yes"/>
<modifier key="headingImageOnLeft" value="yes"/>
<modifier key="headingLineCount" value="2"/>
<modifier key="headingFontSize" value="1.5"/>
<modifier key="headingBackgroundColor" value="0x00ffffff"/>
<modifier key="headingForegroundColor" value="0x00002d94"/>
<modifier key="headingPanelCounter" value="text"/>
<modifier key="headingPanelCounterPos" value="inHeading"/>
</guiprefs>

If its true then we:

  • Set the image to use a west layout - imgPanel.add(iconLab, BorderLayout.WEST);
  • Add an 8 pixel border to leftHeadingPanel (which will now be on the right)
  • Add to the northPanel the imgPanel, HorizontalGlue, and leftHeadingPanel
  • For all the heading labels set the X alignment to RIGHT

I have tested with various settings and it all looks OK. Only heading text and summaries should be affected.

Anyone see any issues?

  • Jeff
Show
Jeff Gordon added a comment - In InstallerFrame I have added an instance variable "imageLeft" which is false by default. In createHeading() we look for the modifier key headingImageOnLeft: <guiprefs width="600" height="480" resizable="no"> <modifier key="useHeadingPanel" value="yes"/> <modifier key="useHeadingForSummary" value="yes"/> <modifier key="headingImageOnLeft" value="yes"/> <modifier key="headingLineCount" value="2"/> <modifier key="headingFontSize" value="1.5"/> <modifier key="headingBackgroundColor" value="0x00ffffff"/> <modifier key="headingForegroundColor" value="0x00002d94"/> <modifier key="headingPanelCounter" value="text"/> <modifier key="headingPanelCounterPos" value="inHeading"/> </guiprefs> If its true then we:
  • Set the image to use a west layout - imgPanel.add(iconLab, BorderLayout.WEST);
  • Add an 8 pixel border to leftHeadingPanel (which will now be on the right)
  • Add to the northPanel the imgPanel, HorizontalGlue, and leftHeadingPanel
  • For all the heading labels set the X alignment to RIGHT
I have tested with various settings and it all looks OK. Only heading text and summaries should be affected. Anyone see any issues?
  • Jeff
Hide
Julien Ponge added a comment -

Sounds good, you can go ahead (just don't forget the documentation).

Show
Julien Ponge added a comment - Sounds good, you can go ahead (just don't forget the documentation).
Hide
Jeff Gordon added a comment -

Done as specified.

Show
Jeff Gordon added a comment - Done as specified.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: