* {
border: 0;
+ -moz-border-radius: 0;
-webkit-border-radius: 0;
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-webkit-box-sizing: border-box;
- font-family: inherit;
+ /*font-family: inherit;*/
font-size: 100%;
font-style: inherit;
font-weight: inherit;
border: 1px solid #999999;
}
-body {
+panel {
+ display: block;
width: 320px;
- font-family: Helvetica;
+}
+
+body {
+ font-family: Helvetica, Arial;
-webkit-text-size-adjust: none;
-webkit-user-select: none;
+ margin: 0 auto;
+ width: 320px;
}
body.white {
color: #aaaabb;
}
+.deleted {
+ display: none;
+}
+
/* #toolbar {{{ */
dialog > toolbar {
background: url(toolbar.png) #6d84a2 repeat-x;
border-top: 1px solid #999999;
border-left: 1px dotted #999999;
border-right: 1px dotted #999999;
+ -moz-border-radius: 9px;
-webkit-border-radius: 9px;
//border: 1px solid #999999;
display: block;
font-size: 16px;
- margin: 9px 10px;
+ margin: 9px;
padding: 0 10px;
}
panel > fieldset {
background-color: #ffffff;
border: 1px solid #999999;
+ -moz-border-radius: 9px;
-webkit-border-radius: 9px;
font-size: 16px;
margin: 9px;
panel > input[type="submit"] {
/*-webkit-border-image: url(whiteButton.png) 0 12 0 12;
+ -moz-border-radius: 0;
-webkit-border-radius: 0;
border-width: 0px 12px;*/
border: none;
border-top: 1px solid #999999;
}
-.deleted {
- display: none;
-}
-
-panel > fieldset > a.right:nth-child(2),
+/* XXX: should be a.left:nth-last-child(2) */
+panel > fieldset > a.left,
+panel > fieldset > a.middle,
panel > fieldset > a:first-child,
panel > fieldset > div:first-child,
panel > fieldset > textarea:first-child {
padding: 4px 4px 2px 5px;
}
-panel > fieldset > a[type="ad"]:first-child > div:first-of-type,
-panel > fieldset > a[type="comment"]:first-child > div:first-of-type,
-panel > fieldset > a[type="profile"]:first-child > div:first-of-type,
-panel > fieldset > a[type="thumb"]:first-child > div:first-of-type {
+panel > fieldset > a[type="ad"]:first-child > div:first-child,
+panel > fieldset > a[type="comment"]:first-child > div:first-child,
+panel > fieldset > a[type="profile"]:first-child > div:first-child,
+panel > fieldset > a[type="thumb"]:first-child > div:first-child {
+ -moz-border-radius-topleft: 9px;
-webkit-border-top-left-radius: 9px;
}
-panel > fieldset > a[type="ad"]:last-child > div:first-of-type,
-panel > fieldset > a[type="comment"]:last-child > div:first-of-type,
-panel > fieldset > a[type="profile"]:last-child > div:first-of-type,
-panel > fieldset > a[type="thumb"]:last-child > div:first-of-type {
+panel > fieldset > a[type="ad"]:last-child > div:first-child,
+panel > fieldset > a[type="comment"]:last-child > div:first-child,
+panel > fieldset > a[type="profile"]:last-child > div:first-child,
+panel > fieldset > a[type="thumb"]:last-child > div:first-child {
+ -moz-border-radius-bottomleft: 9px;
-webkit-border-bottom-left-radius: 9px;
}
-fieldset > a[type="ad"] > div:first-of-type {
+fieldset > a[type="ad"] > div:first-child {
border: 1px solid #999999;
}
-list > fieldset > a[type="comment"] > div:first-of-type,
-list > fieldset > a[type="profile"] > div:first-of-type,
-list > fieldset > a[type="thumb"] > div:first-of-type {
+list > fieldset > a[type="comment"] > div:first-child,
+list > fieldset > a[type="profile"] > div:first-child,
+list > fieldset > a[type="thumb"] > div:first-child {
border: 1px solid #e0e0e0;
}
-panel > fieldset > a[type="comment"] > div:first-of-type {
+panel > fieldset > a[type="comment"] > div:first-child {
border: 1px solid #999999;
border-bottom-style: dashed;
}
-panel > fieldset > a[type="profile"] > div:first-of-type,
-panel > fieldset:not(.header) > a[type="thumb"] > div:first-of-type {
+panel > fieldset > a[type="profile"] > div:first-child,
+panel > fieldset:not(.header) > a[type="thumb"] > div:first-child {
border: 1px solid #999999;
}
div[tile="music"] { background-image: url(http://cache.saurik.com/cydia/tile/video.png); }
div[tile="site"] { background-image: url(http://cache.saurik.com/cydia/tile/site.png); }
-fieldset > a[type="ad"] > div:first-of-type {
+fieldset > a[type="ad"] > div:first-child {
background-repeat: no-repeat;
background-position: center center;
border-right: none;
border-bottom-style: dashed;
}
-fieldset > a[type="comment"] > div:first-of-type {
+fieldset > a[type="comment"] > div:first-child {
-webkit-background-size: 44px;
height: 44px;
width: 44px;
}
-fieldset > a[type="header"] > div:first-of-type {
+fieldset > a[type="header"] > div:first-child {
height: 64px;
width: 64px;
}
-fieldset > a[type="profile"] > div:first-of-type {
+fieldset > a[type="profile"] > div:first-child {
-webkit-background-size: 50px;
height: 50px;
width: 50px;
}
-fieldset > a[type="thumb"] > div:first-of-type {
+fieldset > a[type="thumb"] > div:first-child {
height: 64px;
width: 64px;
}
-fieldset > a[type="comment"] > div:first-of-type,
-fieldset > a[type="header"] > div:first-of-type,
-fieldset > a[type="profile"] > div:first-of-type,
-fieldset > a[type="thumb"] > div:first-of-type {
+fieldset > a[type="comment"] > div:first-child,
+fieldset > a[type="header"] > div:first-child,
+fieldset > a[type="profile"] > div:first-child,
+fieldset > a[type="thumb"] > div:first-child {
background-repeat: no-repeat;
background-position: center center;
display: inline-block;
width: 30px;
}
+fieldset > a.sixth > img.icon {
+ position: relative;
+ left: 7px;
+}
+
panel > block > p,
fieldset > div > p,
panel > block > ul,
fieldset > div > ul {
- margin: 11px 0;
+ margin: 10px 0;
}
panel > block > ul,
}
fieldset > textarea,
-fieldset > div > input,
-fieldset > div > select {
+fieldset > div > input:not([type="checkbox"]),
+fieldset > div > select,
+fieldset > div > div > select {
background: none;
-webkit-box-shadow: none;
-webkit-appearance: none;
/* Chevrons {{{ */
fieldset > a[href]:not([type="ad"]),
-fieldset > div > select {
+fieldset > div > select,
+fieldset > div > div > select {
background-repeat: no-repeat;
background-image: url(chevron.png);
- background-position-y: center;
}
/* Horizontal */
list > fieldset > a[href] {
- background-position-x: 295px;
+ background-position: 295px center;
}
panel > fieldset > a[href] {
- background-position-x: 275px;
+ background-position: 275px center;
}
panel > fieldset > a[href].half {
- background-position-x: 125px;
+ background-position: 125px center;
+}
+
+panel > fieldset > a[href].third {
+ background-position: 75px center;
+}
+
+panel > fieldset > a[href].sixth {
+ background: none;
}
list > fieldset > a:not([href]) > select,
-list > fieldset > div > select {
- background-position-x: 183px;
+list > fieldset > div > select,
+list > fieldset > div > div > select {
+ background-position: 183px center;
}
panel > fieldset > a:not([href]) > select,
-panel > fieldset > div > select {
- background-position-x: 163px;
+panel > fieldset > div > select,
+panel > fieldset > div > div > select {
+ background-position: 163px center;
}
/* }}} */
fieldset > textarea,
fieldset > div > input,
fieldset > div > select,
-fieldset > a > div > label:nth-of-type(2),
-fieldset > div > div > label:nth-of-type(2) {
+fieldset > div > div > select,
+fieldset > a > div > label + label,
+fieldset > div > div > label + label {
color: #193250;
}
fieldset > textarea,
fieldset > div > input,
-fieldset > div > select {
+fieldset > div > select,
+fieldset > div > div > select {
font-size: 16px;
}
padding-right: 14px;
}
+fieldset > div > input[type="checkbox"] {
+ border: 1px solid #999999;
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+ float: right;
+ margin: -7px -8px;
+ height: 30px;
+ width: 30px;
+}
+
fieldset > div > select,
-fieldset > div > input {
+fieldset > div > div > select,
+fieldset > div > input:not([type="checkbox"]) {
border: none;
float: right;
height: 40px;
}
panel > fieldset > div > select,
-panel > fieldset > div > input {
+panel > fieldset > div > div > select,
+panel > fieldset > div > input:not([type="checkbox"]) {
width: 187px;
}
list > fieldset > div > select,
-list > fieldset > div > input {
+list > fieldset > div > div > select,
+list > fieldset > div > input:not([type="checkbox"]) {
width: 207px;
}
width: 273px;
}
-fieldset > a[type="ad"] > div:nth-of-type(2) {
+fieldset > a[type="ad"] > div:nth-child(2) {
width: 218px;
}
width: 221px;
}
-fieldset > a[type="profile"] > div:nth-of-type(2) > label:nth-of-type(1).unknown {
+fieldset > a[type="profile"] > div:nth-child(2) > label:nth-child(1).unknown {
color: #aaaabb;
}
-fieldset > a[type="profile"] > div:nth-of-type(2) > label:only-of-type {
+fieldset > a[type="profile"] > div:nth-child(2) > label:only-child {
left: 4px;
position: relative;
top: 3px;
}
-fieldset > a[type="thumb"] > div:nth-of-type(2) > label:only-of-type {
+fieldset > a[type="thumb"] > div:nth-child(2) > label:only-child {
position: relative;
top: 10px;
}
-fieldset > a[type="profile"] > div:nth-of-type(2) > label:nth-of-type(2) {
+fieldset > a[type="profile"] > div:nth-child(2) > label + label {
display: block;
font-size: 13px;
margin-top: 2px;
}
-fieldset > a[type="thumb"] > div:nth-of-type(2) > label:nth-of-type(2) {
+fieldset > a[type="thumb"] > div:nth-child(2) > label + label {
display: block;
margin-top: 2px;
}
-fieldset > a[type="profile"] > div:nth-of-type(2) {
+fieldset > a[type="profile"] > div:nth-child(2) {
width: 207px;
}
-fieldset > a[type="thumb"] > div:nth-of-type(2) {
+fieldset > a[type="thumb"] > div:nth-child(2) {
width: 193px;
}
-fieldset > a[type="profile"] > div:nth-of-type(2) {
+fieldset > a[type="profile"] > div:nth-child(2) {
margin: -5px 0;
}
-fieldset > a[type="profile"] > div:nth-of-type(2),
-fieldset > a[type="thumb"] > div:nth-of-type(2) {
+fieldset > a[type="profile"] > div:nth-child(2),
+fieldset > a[type="thumb"] > div:nth-child(2) {
vertical-align: top;
}
-fieldset > a > label:first-of-type,
-fieldset > a > div > label:first-of-type,
-fieldset > div > label:first-of-type,
-fieldset > div > div > label:first-of-type {
+fieldset > a > label:first-child,
+fieldset > a > div > label:first-child,
+fieldset > div > label:first-child,
+fieldset > div > div > label:first-child {
font-weight: bold;
}
/* XXX: this doesn't handle icon offsets */
-list > fieldset > a:not([type]) > div > label:nth-of-type(2),
-list > fieldset > div > div > label:nth-of-type(2) {
+list > fieldset > a:not([type]) > div > label + label,
+list > fieldset > div > div > label + label {
margin-left: 94px;
}
-panel > fieldset > a:not([type]) > div > label:nth-of-type(2),
-panel > fieldset > div > div > label:nth-of-type(2) {
+panel > fieldset > a:not([type]) > div > label + label,
+panel > fieldset > div > div > label + label {
float: right;
text-align: right;
}
fieldset > a[type="ad"] {
}
-fieldset > a[type="ad"] > div:nth-of-type(2) {
+fieldset > a[type="ad"] > div:nth-child(2) {
position: relative;
vertical-align: top;
}
-fieldset > a[type="ad"] > div > label:nth-of-type(1) {
+fieldset > a[type="ad"] > div > label:first-child {
color: #2d2d50;
font-size: 13px;
font-weight: bold;
line-height: 15px;
}
-fieldset > a[type="ad"] > div > label:nth-of-type(2) {
+fieldset > a[type="ad"] > div > label + label {
position: absolute;
top: 17px;
left: 156px;
font-weight: normal;
}
+panel > fieldset > a.middle,
panel > fieldset > a.right {
border-left: 1px solid #999999;
}
width: 150px;
}
+panel > fieldset > a.third {
+ display: inline-block;
+ width: 100px;
+}
+
+panel > fieldset > a.sixth {
+ display: inline-block;
+ width: 50px;
+}
+
fieldset.half > a {
background: none;
- background-position-x: 120px;
+ background-position: 120px center;
}
fieldset.half > a > img.icon + div {
}
fieldset > a[type="thumb"]:first-child > back {
+ -moz-border-radius-topright: 9px;
-webkit-border-top-right-radius: 9px;
}
fieldset > a[type="thumb"]:last-child > back {
+ -moz-border-radius-bottomright: 9px;
-webkit-border-bottom-right-radius: 9px;
}
.mm {
border: 1px solid #999999;
+ -moz-border-radius: 9px;
-webkit-border-radius: 9px;
}
width: 79px;
}
+fieldset > a.small.third > img.icon + div {
+ width: 50px;
+}
+
+fieldset > a.small.sixth > img.icon + div {
+ width: 0px;
+}
+
panel.centered > label {
margin-left: 0px;
margin-right: 0px;
margin: -9px 0;
}
+panel > iframe:first-child,
panel > iframe + iframe {
margin-top: 0;
}
panel > fieldset.header {
background-color: transparent;
border: none;
- margin: -5px 0 -11px 0;
+ margin: -5px 9px -11px 9px;
}
panel > fieldset.header > a > div > label {
/* Random Global Variables {{{ */
static const int PulseInterval_ = 50000;
+static const int ButtonBarWidth_ = 60;
static const int ButtonBarHeight_ = 48;
static const float KeyboardTime_ = 0.3f;
case 4: [close_ setTitle:UCLocalize("REBOOT_DEVICE")]; break;
}
-#define ListCache_ "/User/Library/Caches/com.apple.mobile.installation.plist"
-#define IconCache_ "/User/Library/Caches/com.apple.springboard-imagecache-icons.plist"
-
- unlink(IconCache_);
-
- if (NSMutableDictionary *cache = [[NSMutableDictionary alloc] initWithContentsOfFile:@ListCache_]) {
- [cache autorelease];
-
- NSFileManager *manager([NSFileManager defaultManager]);
- NSError *error(nil);
-
- id system([cache objectForKey:@"System"]);
- if (system == nil)
- goto error;
-
- struct stat info;
- if (stat(ListCache_, &info) == -1)
- goto error;
-
- [system removeAllObjects];
-
- if (NSArray *apps = [manager contentsOfDirectoryAtPath:@"/Applications" error:&error]) {
- for (NSString *app in apps)
- if ([app hasSuffix:@".app"]) {
- NSString *path = [@"/Applications" stringByAppendingPathComponent:app];
- NSString *plist = [path stringByAppendingPathComponent:@"Info.plist"];
- if (NSMutableDictionary *info = [[NSMutableDictionary alloc] initWithContentsOfFile:plist]) {
- [info autorelease];
- if ([info objectForKey:@"CFBundleIdentifier"] != nil) {
- [info setObject:path forKey:@"Path"];
- [info setObject:@"System" forKey:@"ApplicationType"];
- [system addInfoDictionary:info];
- }
- }
- }
- } else goto error;
-
- [cache writeToFile:@ListCache_ atomically:YES];
-
- if (chown(ListCache_, info.st_uid, info.st_gid) == -1)
- goto error;
- if (chmod(ListCache_, info.st_mode) == -1)
- goto error;
-
- if (false) error:
- lprintf("%s\n", error == nil ? strerror(errno) : [[error localizedDescription] UTF8String]);
- }
-
- notify_post("com.apple.mobile.application_installed");
+ system("su -c /usr/bin/uicache mobile");
[delegate_ setStatusBarShowsProgress:NO];
}
- (id) init {
if ((self = [super init]) != nil) {
icon_ = [[UIImage applicationImageNamed:@"folder.png"] retain];
-
switch_ = [[_UISwitchSlider alloc] initWithFrame:CGRectMake(218, 9, 60, 25)];
[switch_ addTarget:self action:@selector(onSwitch:) forEvents:UIControlEventTouchUpInside];
} return self;
if (!selected)
UISetColor(Black_);
- [name_ drawAtPoint:CGPointMake(48, 9) forWidth:(editing_ ? 164 : 250) withFont:Font22Bold_ ellipsis:2];
+
+ float width(rect.size.width + 23);
+ if (editing_)
+ width -= 86;
+
+ [name_ drawAtPoint:CGPointMake(48, 9) forWidth:(width - 170) withFont:Font22Bold_ ellipsis:2];
CGSize size = [count_ sizeWithFont:Font14_];
frame.size.height = 0;
[webview_ setFrame:frame];
- [scroller_ scrollPointVisibleAtTopLeft:CGPointZero];
+ if ([scroller_ respondsToSelector:@selector(scrollPointVisibleAtTopLeft:)])
+ [scroller_ scrollPointVisibleAtTopLeft:CGPointZero];
+ else
+ [scroller_ scrollRectToVisible:CGRectZero animated:NO];
WebThreadLock();
[[[webview_ webView] windowScriptObject] setValue:package_ forKey:@"package"];
for (int i = 0; i != 5; ++i)
[[toolbar_ viewWithTag:(i + 1)] setFrame:CGRectMake(
- i * 64 + 2, 1, 60, ButtonBarHeight_
+ i * (screenrect.size.width / 5) + (screenrect.size.width / 5 - ButtonBarWidth_) / 2, 1,
+ ButtonBarWidth_, ButtonBarHeight_
)];
[toolbar_ showSelectionForButton:1];