+ Reply
Results 1 to 2 of 2

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Random Wallpaper Cycler programming on IOS 4.3.3 Help Please!

is a discussion within the

Skinning / Themes Discussion

forums, a part of the

Design and Media For the iPhone / iPod Touch

section;
...
  1. #1
    What's Jailbreak?
    Join Date
    Jun 2011
    Posts
    22
    Thanks
    4
    Thanked 8 Times in 3 Posts

    Unhappy Random Wallpaper Cycler programming on IOS 4.3.3 Help Please!
    Hi, i had a theme for winterspring on my iPhone 3gs, that changed my lockscreen background every time, when i locked my phone. Now i want to put it on my iphone 4, it almost works, the only problem is, that its "zooms" in to my lockscreen pictures, not showing the full pic, only just a part of it. Ill post a screenshot of that. I think i should change something in the code, to show the pics correctly, but im not a programmer, so could anyone help me with that? thank you!

    my lockscreen now:
    ImageShack® - Online Photo and Video Hosting

    the picture should look like this:
    ImageShack® - Online Photo and Video Hosting

    here is the code, its in a lockbackground.html file:
    Code:
    <?xml version="1.0" encoding="UTF-16"?><html><head>
    <script src="configuration.js"></script>
    <script type="text/javascript">
    	document.write('<style type="text/css">body{background: black url('+LOCK_WALLPATH+(((new Date()).getTime()%LOCK_WPNUM)+1)+'.'+LOCK_IMGTYPE+');}</style>');
    </script>
    </head></html>
    and another file, its a configuration.js:
    Code:
    var LOCK_WPNUM = 6; //The number of wallpapers in your Wallpapers folder.
    var LOCK_WALLPATH = "Lockscreen/"; //Wallpaper path, only if you want to change this. Leave it if you don't know what this'll do! If you want this to be the same as your wallpaper path, change to "Wallpapers/"
    var LOCK_IMGTYPE = "png"; //The filetype of all your images. Usually png, jpg or gif. All images must be the same filetype!
    these are the files i have, nothing more.

  2. #2
    What's Jailbreak?
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hi onderon,

    I had the exact same problem as you. After some struggle I finally found a solution.
    You have to specify the background size in the lockbackground.html file.

    The original code is

    document.write('<style type="text/css">body{background: black url('+LOCK_WALLPATH+(((new Date()).getTime()%LOCK_WPNUM)+1)+'.'+LOCK_IMGTYPE+ ');}</style>');

    At the ending I added background-size: 60.2% so now the code looks like this:

    document.write('<style type="text/css">body{background: black url('+LOCK_WALLPATH+(((new Date()).getTime()%LOCK_WPNUM)+1)+'.'+LOCK_IMGTYPE+ '); background-size: 60.2%;}</style>');

    You may try another pourcentages if you want... It was trial-and-error for me, 60% leave some blank pixels, 61% crop some pixels.

    That's it, hope it was helpful.

    -vaijiro

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