[jitsi-dev] [PATCH] Fix SipCommButtons to display correct images with correct allignment.


#1

This patch fixes SipCommButtons so that only one of bgImage/rolloverImage/pressedImage is painted, with only one of iconImage/rolloverIconImage/pressedIconImage painted over the top, with the correct alignment.

sipcommbutton_fixes.patch (3.26 KB)


#2

Hey Tom,

Could you please tell us a few more words about the issue that you are
resolving here? A screenshot would be nice.

Emil

···

On 20.02.13, 12:27, Tom Denham wrote:

This patch fixes SipCommButtons so that only one of
bgImage/rolloverImage/pressedImage is painted, with only one of
iconImage/rolloverIconImage/pressedIconImage painted over the top, with
the correct alignment.

--
https://jitsi.org


#3

Sure, previously, when an enabled SipCommButton was painted, the layers were (from the bottom layer upwards):
1) bgImage (centre aligned)
2) rolloverImage* or pressedImage, as appropriate (top-left aligned)
3) iconImage or rolloverIconImage or pressedIconImage, using iconImage if a special-state image is required but not available (centre aligned)

*The javadoc for setRolloverImage says that it's rolloverImage is the 'rollover background image', just as bgImage is the 'background image'

Now, the layers will be:
1) bgImage or rolloverBgImage or pressedBgImage, using bgImage if a special-state image is required but not available (centre aligned)
2) iconImage or rolloverIconImage or pressedIconImage, using iconImage if a special-state image is required but not available (centre aligned)

We had hit the issue that when using three different images (not icons) for a SipCommButton, the default image would show through any translucent areas of a pressed/rollover image (see screenshot).

Screenshot from a branded client is attached but it illustrates the issue.

···

-----Original Message-----

From: Emil Ivov [mailto:emcho@jitsi.org]

Sent: 20 February 2013 11:35
To: dev@jitsi.java.net
Cc: Tom Denham
Subject: Re: [jitsi-dev] [PATCH] Fix SipCommButtons to display correct images with correct allignment.

Hey Tom,

Could you please tell us a few more words about the issue that you are resolving here? A screenshot would be nice.

Emil

On 20.02.13, 12:27, Tom Denham wrote:

This patch fixes SipCommButtons so that only one of
bgImage/rolloverImage/pressedImage is painted, with only one of
iconImage/rolloverIconImage/pressedIconImage painted over the top,
with the correct alignment.

--
https://jitsi.org