Discussion:
[Bitpim-devel] Happy new year Steven :-)
Roger Binns
2004-01-01 10:18:25 UTC
Permalink
The camera images are now resized in the wallpaper display. You need to
check two pieces of code.

guihelper: IsMac - I don't know what wx.Platform returns on Mac (*)

wallpaper: line 162 The List widget does silly things with the background
colour in the resized image. I try to set the borders
to transparent. That works fine on Windows. On Linux
the display is a mess and the GetBackgroundColour function
lies. Feel free to pick what Mac does.

The wallpaper display now also updates when changed on Linux (and I would
assume the fix works for Mac as well). You can also do deletion of
items. The ringers view is still being stubborn.

(*) There are two different mechanisms used for determing the platform.
In several places (eg makedist) it uses sys.platform. In others it uses
wx.Platform. In theory a single system (eg Linux) could have multiple
versions of Wx (eg if they did wxGtk and wxQt). So the various places
really should check against the right thing. That is the theory anyway :-)

Roger
Steven Palm
2004-01-01 17:46:31 UTC
Permalink
Post by Roger Binns
The camera images are now resized in the wallpaper display. You need to
check two pieces of code.
guihelper: IsMac - I don't know what wx.Platform returns on Mac (*)
__WXMAC__ just as you surmised.
Post by Roger Binns
wallpaper: line 162 The List widget does silly things with the background
colour in the resized image. I try to set the borders
to transparent. That works fine on Windows.
On Linux
the display is a mess and the
GetBackgroundColour function
lies. Feel free to pick what Mac does.
Using None, as you do for Windows, basically works on the Mac, but
some of the images that came from the phone show weird behavior... The
lines of the image, which are black when using the GetBackgroundColor
show as transparent with just a thin black outline when using None.
Post by Roger Binns
The wallpaper display now also updates when changed on Linux (and I would
assume the fix works for Mac as well). You can also do deletion of
items. The ringers view is still being stubborn.
This all works as it should on the Mac as well.

Beautiful job! Works very well indeed. The ringers are stubborn,
indeed, they still only show the briefest flicker when resizing the
window, otherwise the window is empty. I have looked through the
existing code, but admit to seeing nothing that strikes me as causing
or contributing to the problem. It should just work. <smile>

-. ----. -.-- - -.--
Steve Palm - ***@n9yty.com
-. ----. -.-- - -.--
Roger Binns
2004-01-02 02:49:19 UTC
Permalink
Post by Steven Palm
Using None, as you do for Windows, basically works on the Mac,
Can you double check? The list control is assigned an ImageList
which contains one wxImage per wallpaper. The way transparency
is done for wxImage is that a particular colour is marked as
transparent. The FindFirstUnusedColour function is used to
find one that isn't used in the image.

On Windows, it works fine. On Linux I think the ImageList doesn't
cope with each image (potenbtially) having a different colour defined as
transparent. (The FindFirstUnusedColour function starts at RGB=0,0,0
and works it way up to find an unused colour. That means that black or
something very close to it will end up being the transparent colour),

I have attached two screenshots showing what happens on Linux.
wptransparent is using the same code as Windows. Note how some blacks
are replaced with the background colour. wpbg shows the same images
but not using transparency and instead asking the List what the background
colour is. It says grey, but the answer is actually white.

Roger
Steven Palm
2004-01-02 15:14:22 UTC
Permalink
Post by Roger Binns
Can you double check?
After seeing your more detailed explanation, I think it may be doing
the same thing as Linux. The first screen capture is using
GetBackgroundColor, and the second using None.

So for the time being, I think just leaving it as GetBackgroundColor
is probably the best approach.

-. ----. -.-- - -.--
Steve Palm - ***@n9yty.com
-. ----. -.-- - -.--
Roger Binns
2004-01-02 19:24:14 UTC
Permalink
Post by Steven Palm
So for the time being, I think just leaving it as GetBackgroundColor
is probably the best approach.
All those images are the builtin ones which are correctly sized already.
Try putting an image on the phone (overwriting an existing one via the
filesystem view) with an aspect ratio of 3 to 1. That will definitely
cause stripes on the side, and you should be able to tell if the
GetBackgroundColour function lies.

Roger

Roger Binns
2004-01-02 11:22:23 UTC
Permalink
Post by Steven Palm
The ringers are stubborn,
indeed, they still only show the briefest flicker when resizing the
window, otherwise the window is empty. I have looked through the
existing code, but admit to seeing nothing that strikes me as causing
or contributing to the problem. It should just work. <smile>
I spent several hours today trying to figure them out. Although
the code has changed a bit since 0.62 (where it worked fine on
Linux), it shouldn't have made a difference. Heck in frustration
I even hacked the code back in so it was exactly like the old code
and still had the problem.

I have seen issues before if you use both "from wxPython.wx import *"
and "import wx" (and yes I did try frigging with that).

I am probably going to make everything use the latter syntax. I
have also posted to the wxPython group.

If noone can find a fix, I think we will just do a test release
anyway.

Roger
Loading...