Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 1036 Lines • ▼ Show 20 Line(s) | 1036 | return(targetItem.width - units.largeSpacing * 2 - (isPopup ? 0 : units.smallSpacing * 2) + __style.padding.left + __style.padding.right + | |||
---|---|---|---|---|---|
1037 | (addWidthVerticalScroller ? __verticalScrollBar.parent.verticalScrollbarOffset : 0)); | 1037 | (addWidthVerticalScroller ? __verticalScrollBar.parent.verticalScrollbarOffset : 0)); | ||
1038 | } | 1038 | } | ||
1039 | 1039 | | |||
1040 | function getHeight(addWidthHoriozontalScroller, init) { | 1040 | function getHeight(addWidthHoriozontalScroller, init) { | ||
1041 | var _height; | 1041 | var _height; | ||
1042 | if(isPopup || init) { | 1042 | if(isPopup || init) { | ||
1043 | _height = targetItem.labelArea.height + __style.padding.top + __style.padding.bottom; | 1043 | _height = targetItem.labelArea.height + __style.padding.top + __style.padding.bottom; | ||
1044 | } else { | 1044 | } else { | ||
1045 | _height = height; | 1045 | var realHeight = contentHeight + __style.padding.top + __style.padding.bottom; | ||
1046 | if(contentHeight + __style.padding.top + __style.padding.bottom > _height) { | 1046 | var maxHeight = theme.mSize(theme.defaultFont).height * (plasmoid.configuration.textLines + 1) + __style.padding.top + __style.padding.bottom; | ||
1047 | var maxHeight = Math.max(_height, theme.mSize(theme.defaultFont).height * (plasmoid.configuration.textLines + 1) + __style.padding.top + __style.padding.bottom); | 1047 | _height = Math.min(realHeight, maxHeight); | ||
1048 | _height = Math.min(maxHeight, contentHeight + __style.padding.top + __style.padding.bottom); | | |||
1049 | } | | |||
1050 | } | 1048 | } | ||
1051 | return(_height + (addWidthHoriozontalScroller ? __horizontalScrollBar.parent.horizontalScrollbarOffset : 0)); | 1049 | return(_height + (addWidthHoriozontalScroller ? __horizontalScrollBar.parent.horizontalScrollbarOffset : 0)); | ||
1052 | } | 1050 | } | ||
1053 | 1051 | | |||
1054 | function getInitHeight() { | 1052 | function getInitHeight() { | ||
1055 | return(getHeight(false, true)); | 1053 | return(getHeight(false, true)); | ||
1056 | } | 1054 | } | ||
1057 | 1055 | | |||
Show All 36 Lines |