|
|
@ -81,18 +81,15 @@ int UBWidgetList::scaleWidgets(QSize pSize) |
|
|
|
scaleFactor = (float)mWidgetInfo[eachWidget].width() / (float)pSize.width(); |
|
|
|
scaleFactor = (float)mWidgetInfo[eachWidget].width() / (float)pSize.width(); |
|
|
|
newWidgetHeight = mWidgetInfo[eachWidget].height()/scaleFactor; |
|
|
|
newWidgetHeight = mWidgetInfo[eachWidget].height()/scaleFactor; |
|
|
|
result += newWidgetHeight; |
|
|
|
result += newWidgetHeight; |
|
|
|
|
|
|
|
eachWidget->setMinimumHeight(newWidgetHeight- 1); |
|
|
|
|
|
|
|
eachWidget->setMaximumHeight(newWidgetHeight); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
if(eWidgetListOrientation_Vertical == mOrientation){ |
|
|
|
scaleFactor = (float)mWidgetInfo[eachWidget].height() / (float)pSize.height(); |
|
|
|
result += mWidgetInfo[eachWidget].height(); |
|
|
|
newWidgetWidth = mWidgetInfo[eachWidget].width()/scaleFactor; |
|
|
|
eachWidget->setMinimumHeight(mWidgetInfo[eachWidget].height()); |
|
|
|
result += newWidgetWidth; |
|
|
|
eachWidget->setMaximumHeight(mWidgetInfo[eachWidget].height() + 1); |
|
|
|
eachWidget->setMinimumWidth(newWidgetWidth - 1); |
|
|
|
} |
|
|
|
eachWidget->setMaximumWidth(newWidgetWidth); |
|
|
|
else{ |
|
|
|
|
|
|
|
result += mWidgetInfo[eachWidget].width(); |
|
|
|
|
|
|
|
eachWidget->setMinimumWidth(mWidgetInfo[eachWidget].width()); |
|
|
|
|
|
|
|
eachWidget->setMaximumWidth(mWidgetInfo[eachWidget].width() + 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//Adding a vertical/horizontal space between each element of the list
|
|
|
|
//Adding a vertical/horizontal space between each element of the list
|
|
|
|
result += mListElementsSpacing; |
|
|
|
result += mListElementsSpacing; |
|
|
|