fix positioning of icon items in lists

This commit is contained in:
rlx 2013-08-05 22:02:16 +00:00
parent 81be40b7a1
commit 95a9a6274e
2 changed files with 6 additions and 6 deletions

View file

@ -73,9 +73,9 @@ Ox.IconItem = function(options, self) {
that.$icon = $('<div>') that.$icon = $('<div>')
.addClass('OxIcon') .addClass('OxIcon')
.css({ .css({
top: self.options.iconWidth == 64 ? -64 : -124, top: (self.options.iconWidth == 64 ? -64 : -122) + 'px',
width: (self.options.iconWidth + 4) + 'px', width: self.options.iconWidth + 4 + 'px',
height: (self.options.iconHeight + 4) + 'px' height: self.options.iconHeight + 4 + 'px'
}); });
that.$iconImage = $('<img>') that.$iconImage = $('<img>')
.addClass('OxLoading OxTarget') .addClass('OxLoading OxTarget')
@ -94,7 +94,7 @@ Ox.IconItem = function(options, self) {
that.$textBox = $('<div>') that.$textBox = $('<div>')
.addClass('OxText') .addClass('OxText')
.css({ .css({
top: self.options.iconHeight - self.options.itemWidth / 2 + 'px', top: self.options.iconHeight - (self.options.itemWidth == 64 ? 32 : 62) + 'px',
width: self.options.itemWidth + 4 + 'px', width: self.options.itemWidth + 4 + 'px',
height: (self.options.itemWidth == 64 ? 30 : 58) + 'px' height: (self.options.itemWidth == 64 ? 30 : 58) + 'px'
}); });
@ -116,7 +116,7 @@ Ox.IconItem = function(options, self) {
that.$reflection = $('<div>') that.$reflection = $('<div>')
.addClass('OxReflection') .addClass('OxReflection')
.css({ .css({
top: self.options.iconHeight + 'px', top: self.options.iconHeight + (self.options.itemWidth == 64 ? 0 : 2) + 'px',
width: self.options.itemWidth + 4 + 'px', width: self.options.itemWidth + 4 + 'px',
height: self.options.itemHeight - self.options.iconHeight + 'px' height: self.options.itemHeight - self.options.iconHeight + 'px'
}); });

View file

@ -111,7 +111,7 @@ Ox.InfoList = function(options, self) {
float: 'left', float: 'left',
width: '132px', width: '132px',
height: '192px', height: '192px',
margin: '4px 2px 4px 2px' margin: '2px'
}) })
.append( .append(
Ox.IconItem(Ox.extend(data.icon, { Ox.IconItem(Ox.extend(data.icon, {