forked from 0x2620/pandora
fix some more info resize bugs
This commit is contained in:
parent
f666b7b6d5
commit
50a741c9fa
3 changed files with 8 additions and 4 deletions
|
@ -45,14 +45,19 @@ pandora.ui.info = function() {
|
||||||
function resizeInfo() {
|
function resizeInfo() {
|
||||||
var height = pandora.getInfoHeight(true);
|
var height = pandora.getInfoHeight(true);
|
||||||
Ox.print('RESIZE INFO', ui.showInfo, height)
|
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) {
|
if (ui.showInfo) {
|
||||||
pandora.$ui.leftPanel.size(2, height, function() {
|
pandora.$ui.leftPanel.size(2, height, function() {
|
||||||
pandora.resizeFolders();
|
pandora.resizeFolders();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
pandora.$ui.leftPanel.css({bottom: -height});
|
pandora.$ui.leftPanel.css({bottom: -height + 'px'});
|
||||||
pandora.resizeFolders();
|
pandora.resizeFolders();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateInfo() {
|
function updateInfo() {
|
||||||
|
|
|
@ -34,7 +34,7 @@ pandora.ui.leftPanel = function() {
|
||||||
pandora.$ui.sectionbar.append(pandora.$ui.sectionButtons = pandora.ui.sectionButtons());
|
pandora.$ui.sectionbar.append(pandora.$ui.sectionButtons = pandora.ui.sectionButtons());
|
||||||
}
|
}
|
||||||
pandora.$ui.leftPanel.size(2, infoHeight);
|
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.resizeFolders();
|
||||||
pandora.$ui.info.resizeInfo();
|
pandora.$ui.info.resizeInfo();
|
||||||
},
|
},
|
||||||
|
|
|
@ -467,10 +467,9 @@ pandora.getFoldersHeight = function() {
|
||||||
|
|
||||||
pandora.getFoldersWidth = function() {
|
pandora.getFoldersWidth = function() {
|
||||||
var width = pandora.user.ui.sidebarSize;
|
var width = pandora.user.ui.sidebarSize;
|
||||||
// fixme: don't use height(), look up in splitpanels
|
|
||||||
if (
|
if (
|
||||||
pandora.$ui.appPanel
|
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;
|
width -= Ox.UI.SCROLLBAR_SIZE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue