From babcd82f480392c545cd7e74f9554716e646c409 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 30 Mar 2011 07:56:31 +0000 Subject: [PATCH] Support iPad-oriented LCD bars. --- PhotoExample.cydget/index.html | 49 +++++++++++++++++++++++++++++----- Welcome.html | 49 +++++++++++++++++++++++++++++----- 2 files changed, 84 insertions(+), 14 deletions(-) diff --git a/PhotoExample.cydget/index.html b/PhotoExample.cydget/index.html index 17981e6..a99a0bb 100644 --- a/PhotoExample.cydget/index.html +++ b/PhotoExample.cydget/index.html @@ -33,27 +33,62 @@ #lcd { background: url(cydget://_UIImageWithName/UILCDBackground.png); height: 96px; - width: 320px; + width: 100%; } #lcd h1 { font-family: "LockClock-Light"; - font-size: 65px; - left: 1px; + padding: 0px 0px 0px 1px; position: relative; text-align: center; text-shadow: -0.5px -1px 1px black; - top: -6px; - width: 319px; } #lcd h2 { font-family: "Helvetica"; - font-size: 17px; position: relative; text-align: center; text-shadow: -0.5px -1px 1px black; - top: -16px; + } + + @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { + #lcd h1 { + font-size: 65px; + top: -6px; + } + + #lcd h2 { + font-size: 17px; + top: -16px; + } + } + + @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) { + #lcd h1 { + font-size: 69px; + top: -8px; + } + + #lcd h2 { + font-size: 16px; + top: -18px; + } + } + + @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) { + #lcd { + height: 107px; + } + + #lcd h1 { + font-size: 69px; + top: -1px; + } + + #lcd h2 { + font-size: 16px; + top: -8px; + } } #content { diff --git a/Welcome.html b/Welcome.html index c637a23..c6f947f 100644 --- a/Welcome.html +++ b/Welcome.html @@ -33,27 +33,62 @@ #lcd { background: url(cydget://_UIImageWithName/UILCDBackground.png); height: 96px; - width: 320px; + width: 100%; } #lcd h1 { font-family: "LockClock-Light"; - font-size: 65px; - left: 1px; + padding: 0px 0px 0px 1px; position: relative; text-align: center; text-shadow: -0.5px -1px 1px black; - top: -6px; - width: 319px; } #lcd h2 { font-family: "Helvetica"; - font-size: 17px; position: relative; text-align: center; text-shadow: -0.5px -1px 1px black; - top: -16px; + } + + @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { + #lcd h1 { + font-size: 65px; + top: -6px; + } + + #lcd h2 { + font-size: 17px; + top: -16px; + } + } + + @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) { + #lcd h1 { + font-size: 69px; + top: -8px; + } + + #lcd h2 { + font-size: 16px; + top: -18px; + } + } + + @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) { + #lcd { + height: 107px; + } + + #lcd h1 { + font-size: 69px; + top: -1px; + } + + #lcd h2 { + font-size: 16px; + top: -8px; + } } #content { -- 2.45.2