Pocket Weather

Discussion in 'Open Source Projects' started by digitaldon37, Nov 12, 2008.

  1. klaus

    klaus Expert Licensed User

    Hi Filippo,

    I can also answer a part of it.

    When I added the display change mode from portait to landscape or reverse, I didn't take care of the fact that when Form3 is displayed, Form1 is displayed after the screen orientation change.
    Unfortunately the fuzzy texts are still there. What background color do you have, I suspect it is white. And, as the background color of bottom of the screen is relatively dark the 'fuzziness' is much more visible.

    For the screen mode I will look with digitaldon37 to change it.
    For the 'fuzziness' could you test in modifying the
    SetTransparentColor(cWhite) to
    to see what the difference is.
    Do you have ClearType characters ?

    The problem with the buttons is for me a known problem, I mentioned it already to digitaldon37.
    The problem is with JPG image files and the transparent color.
    I had created bmp files for buttons with a white surrounding that would be transparent. If you change these BMP files into JPG files the surrounding color is no more pure white but similar RGB(254,254,254) looks like white but is not the transparent color ! In the middle of the arrow the color should be like RGB(254,254,254) almost white but NOT transparent.

    Hallo Filippo,

    Ich kann auch hier einen Teil des Antwort geben.

    Als Ich die Änderung von Portrait auf Landscape und zurück, vorgenommen hatte, habe Ich gar nicht daran gedacht dass wenn man in Form3 die Orientierung ändert Form1 nachher angezeigt wird. Das mit den unscharfen Texten ist leider immer noch da. Welche Hintergrundfarbe hast Du? Ich nehme an weiss. Und da der Hintergrund im unteren Teil des Bildschirms relativ dunkel ist, ist das Problem desto mehr sichtbar.

    Für die Bildschirmorientierung werde Ich mit digitaldon37 sehen dass wir es ändern.
    Für den unscharfen text könntest Du mal
    SetTransparentColor(cWhite) zu
    ändern, um zu sehen ob es besser wird.
    Das Problem mit dem Button ist für mich bekannt, habe es digitaldon37 schon mal geschrieben.
    Das Problem kommt mit JPG Bilddateien und der Transparenzfarbe.
    Ich hatte Bilddateien als BMP Dateien erstellt mit einer weissen Umrandungsfarbe die transparent sein soll. Wenn man diese BMP Dateien in JPG Dateien umwandelt ist die Umrandungsfarbe leider nicht mehr pures weiss sondern annähernd RGB(254,254,254) oder ähnlich, sieht wie weiss aus, ist aber nicht mehr die Transparentfarbe. Der Pfeil in der Mitte muss zum Gegenteil eine Farbe wie RGB(254,254,254) haben, weiss aber NICHT transparent.

  2. digitaldon37

    digitaldon37 Active Member Licensed User

    Hi Filippo,

    As a quick test, you might see if changing the setting "themeFormColor" to something orange helps. (maybe 255,128,0)

    [edit] There are also two other settings you can add to the theme file: buttonColor and ImageColor. You might set those to orange and see if the buttons look better.
    I am going to add this to the bug list and see if I can fix that, as well as applying the settings correctly when switching between themes.
    Last edited: Dec 7, 2008
  3. Filippo

    Filippo Expert Licensed User


    Test running, unfortunately without improvement!

    Test ausgeführt, leider ohne besserung!

  4. digitaldon37

    digitaldon37 Active Member Licensed User

    Hi Filippo,

    If you want to zip up your theme and upload it here, I'll take a look at it. It might help me tweak the code better.

    @all, I think the latest version (.38) is on post #1 if anyone wants to make any changes. I've compiled .38 into a public release 1.0 and haven't planned on a 1.1 any time soon, but the developer version can still move forward. Any changes in it will be rolled up into the next public release.
  5. digitaldon37

    digitaldon37 Active Member Licensed User

    Russian language file error

    I'm getting a "directory access denied" error when I try to load this Russian language file. Any ideas?

    The file was provided by a user over on the xda site. (I don't speak or write Russian)
  6. klaus

    klaus Expert Licensed User

    Can you please test this version.
    There is no Transparent color, and no FErase anymore.
    The texts are drawn directly onto the bachground image.
    I hope that the texts will look somewhat better.
    The other problem has not yet been changed.

    Könntest Du mal diese Version testen.
    Es gibt keine Transparent Farbe und auch kein FErase mehr.
    Die Texte werden direk auf das Hintergrundbild gezeichnet.
    Ich hoffe dass die Texte etwas besser aussehen.
    Das andere Problem ist noch nicht geändert.

    The Russian file problem is solved in this version.
    There were missing 2 lines in the LoadLanguageText routine
    [FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] cRussian[/SIZE][/FONT]
    2][FONT=Courier New]LFile=[/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]AppPath[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]&[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"\lng\WeatherR.txt"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    Best regards.

    EDIT: removed zip files
    Last edited: Dec 12, 2008
  7. digitaldon37

    digitaldon37 Active Member Licensed User

    Thanks Klaus! I'm going to upload this to the main post as a developer's release .39 (I'm using the public release version numbers when I cab it)

    It seems to be producing sharper text for me - can't wait to hear how it works for others.
  8. Filippo

    Filippo Expert Licensed User

    Hallo Klaus,

    now the graphics are almost perfect, only in picture No. 3 is still a small mistake.

    jetzt ist die Grafik fast perfekt, nur in Bild Nr.3 ist noch ein klein Fehler. :)

  9. digitaldon37

    digitaldon37 Active Member Licensed User

    I found something else that needs to be fixed: when you click on the current weather icon to refresh the "last update" message doesn't get erased. The "please wait" seems to be written on top of the previous message. It fixes itself when the refresh is completed though.

    Update: Feedback over at XDA is that the fuzzy fonts are gone!
    Last edited: Dec 8, 2008
  10. klaus

    klaus Expert Licensed User

    Danke für den Test, es ist doch komisch, wie Du es schon mal in einem anderen Test gesehen hattest, dass der Text im Portrait Modus nicht so sauber aussieht als im Landscape Modus.
    Das Problem in Deinem 3ten Bild werde Ich natürlich verbessern. Hatte leider nicht mit allen Sprachen getestet.

    Thank you for the tests, it is starnge, as you already had seen it in a previous test, that the texts in portrait mode are not as sharp as in the landscape mode.
    The porblem in your 3rd image will for shure be improved. Unfortunately I didn't test it with all languages.

    I forgot this one, if you don't mind, I will no more draw the messages on the bottom of the screen, but on a Panel in the middle. Before, when drawing onto the foreground it was easy to refresh a part of the screen without changing the background image. In drawing now directly onto the background image, it would need two whole screen updates for a message, the first time for displaying the message, and the second time to delete it. With the Panel the message display would be independant.

    Best regards.
  11. digitaldon37

    digitaldon37 Active Member Licensed User

    Thanks! I noticed on the pda that there is a delay during screen paints. I don't think this is an issue but I thought I would mention it to see if anyone else noticed it. For example, when going from the main screen to detail screen, you can see the screen being erased (a blank screen shows) and then you see the new screen.

    But again this is a minor point. I think getting rid of the fuzzy fonts (though I never could see them on my pda) is a big win.
  12. klaus

    klaus Expert Licensed User

    Hi digitaldon37,

    I read the posts at xda, and I agree with davehutch about the image sizes. They should be the same for both, image and control.
    - The condition images are 52*52 pixels but in the program 50*50.
    - The detail images are OK 40*40 both
    - The button images back,save etc are 48*48 but in the program 50*50
    - The + / - button images 16*16 and in the program 20*20

    For the +/- buttons there is also a difference in the display on the desktop and the device. I suspect that, as the image files are PNG files they use the 4th byte for tranparency which seems to be used on the desktop but not on my device (WM2003).

    In the attached image you see the difference, left device right desktop. Just for test the upper + button is 16*16 pixels. This should remain 20*20 but 20*20 images.
    There is also an image with the new Message display.

    As I am updating the program, do you want me to also update these sizes.

    Best regards.
  13. digitaldon37

    digitaldon37 Active Member Licensed User

    I think we should change it to the sizes that are standards - ie 48x48 for the condition, 36x36 for details - this would let people drop icons that are already available and use them without much effort.

    The button sizes should probably be something standard also - 48x48?

    I forgot what I used for the add/delete sizes, but those probably should match the control containers on the form.

    At least those are the sizes that I can find that are in use. Realize Weather Icons (for Ifonz, S2U2 and other Apps) by Bluemetalaxe - xda-developers

    Thanks for making the updates!


    add/delete icons: 16x16
    weather forecast details: 36x36
    weather current details: 48x48
    form buttons: 48x48
    Last edited: Dec 9, 2008
  14. klaus

    klaus Expert Licensed User

    Here is version V0.40

    - adapted image sizes to
    condition 48*48
    details 40*40
    buttons 48*48
    add/delete 20*20 the png images are still 16*16 in the gfx folder

    - 10 locations
    - messages in the middle of the screen

    Things to do display the right window and panel.
    I will have a look at it after your update.

    I have updated the files in the sunset and sky themes, but not changed the size of the images.

    Best regards.

    EDIT: removed program zip file.
    Last edited: Dec 12, 2008
  15. digitaldon37

    digitaldon37 Active Member Licensed User


    Attached is version .41

    - Added AppToDate support (google xda-developers or modaco for more info)
    - Check for outdated cache & display message

    [update] re-uploaded; first .41 copy did not have AppToDate enabled.
    Last edited: Jan 10, 2009
  16. digitaldon37

    digitaldon37 Active Member Licensed User

    Yahoo weather sort annoyance

    From the xda forum:

    my reply
    Looks like I need to see how arrays can be sorted in B4PPC...
  17. digitaldon37

    digitaldon37 Active Member Licensed User

    Updated with sorted cities (thanks to agraham's collection library) but I still have the same problem. It looks like Yahoo doesn't provide an alpha list for some states.
    Last edited: Jan 10, 2009
  18. klaus

    klaus Expert Licensed User

    The fact that for certain states there is no alphabetic list is due to the fact that there is no alphabetic list available in Yahoo, this depends on the total number of cities. Look at the two images below. The same behaviour also exists for other countries where you don't even have a states list.

    Unfortunately, the last version does not solve the problem. I tried with the state of Nevada and the city of Zephyr Cove, you get the city of Coyot Springs. Will have a look at it.

    Best regards.
  19. klaus

    klaus Expert Licensed User

    Version 0.41.2 with cities sorted alphabeticaly and the right city code.
    Added also new text files with 2 new texts in, only English, French and German have the text in the right language in the other files the text is in English..

    Best regards.

    EDIT: removed zip file
    Last edited: Dec 12, 2008
  20. klaus

    klaus Expert Licensed User

    Version 0.41.4.
    Removed 2 bugs.
    Added also the text files from previous post.

    Best regards.
    Last edited: Dec 12, 2008
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice