|
|
@ -76,13 +76,11 @@ int UBWidgetList::scaleWidgets(QSize pSize) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int result = 0; |
|
|
|
int result = 0; |
|
|
|
foreach(QWidget* eachWidget, mWidgetInfo.keys()){ |
|
|
|
foreach(QWidget* eachWidget, mWidgetInfo.keys()){ |
|
|
|
qDebug() << __FUNCTION__ << "eachWidget : " << eachWidget; |
|
|
|
|
|
|
|
qreal scaleFactor = 0; |
|
|
|
qreal scaleFactor = 0; |
|
|
|
int newWidgetWidth = pSize.width(); |
|
|
|
int newWidgetWidth = pSize.width(); |
|
|
|
int newWidgetHeight = pSize.height(); |
|
|
|
int newWidgetHeight = pSize.height(); |
|
|
|
if(eWidgetListOrientation_Vertical == mOrientation){ |
|
|
|
if(eWidgetListOrientation_Vertical == mOrientation){ |
|
|
|
scaleFactor = (float)mWidgetInfo[eachWidget].width() / (float)pSize.width(); |
|
|
|
scaleFactor = (float)mWidgetInfo[eachWidget].width() / (float)pSize.width(); |
|
|
|
qDebug() << __FUNCTION__ << "scale factor: " << scaleFactor; |
|
|
|
|
|
|
|
newWidgetHeight = mWidgetInfo[eachWidget].height()/scaleFactor; |
|
|
|
newWidgetHeight = mWidgetInfo[eachWidget].height()/scaleFactor; |
|
|
|
result += newWidgetHeight; |
|
|
|
result += newWidgetHeight; |
|
|
|
} |
|
|
|
} |
|
|
|