fix some more info resize bugs

This commit is contained in:
rolux 2011-10-29 14:17:43 +00:00
parent f666b7b6d5
commit 50a741c9fa
3 changed files with 8 additions and 4 deletions

View file

@ -45,14 +45,19 @@ pandora.ui.info = function() {
function resizeInfo() {
var height = pandora.getInfoHeight(true);
Ox.print('RESIZE INFO', ui.showInfo, height)
pandora.$ui.leftPanel.size(2, height);
pandora.resizeFolders();
!ui.showInfo && pandora.$ui.leftPanel.css({bottom: -height + 'px'});
/*
if (ui.showInfo) {
pandora.$ui.leftPanel.size(2, height, function() {
pandora.resizeFolders();
});
} else {
pandora.$ui.leftPanel.css({bottom: -height});
pandora.$ui.leftPanel.css({bottom: -height + 'px'});
pandora.resizeFolders();
}
*/
}
function updateInfo() {

View file

@ -34,7 +34,7 @@ pandora.ui.leftPanel = function() {
pandora.$ui.sectionbar.append(pandora.$ui.sectionButtons = pandora.ui.sectionButtons());
}
pandora.$ui.leftPanel.size(2, infoHeight);
!pandora.user.ui.showInfo && pandora.$ui.leftPanel.css({bottom: -infoHeight});
!pandora.user.ui.showInfo && pandora.$ui.leftPanel.css({bottom: -infoHeight + 'px'});
pandora.resizeFolders();
pandora.$ui.info.resizeInfo();
},

View file

@ -467,10 +467,9 @@ pandora.getFoldersHeight = function() {
pandora.getFoldersWidth = function() {
var width = pandora.user.ui.sidebarSize;
// fixme: don't use height(), look up in splitpanels
if (
pandora.$ui.appPanel
&& pandora.getFoldersHeight() > pandora.$ui.leftPanel.height() - 24 - 1 - pandora.$ui.info.height()
&& pandora.getFoldersHeight() > window.innerHeight - 20 - 24 - 1 - pandora.getInfoHeight()
) {
width -= Ox.UI.SCROLLBAR_SIZE;
}