fixed duplicated widgets

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent e93410f137
commit b5dc5d1d46
  1. 2
      src/customWidgets/UBWidgetList.cpp
  2. 1
      src/gui/UBTeacherBarWidget.h

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

@ -83,6 +83,7 @@ public:
UBTeacherBarPreviewMedia(QWidget* parent=0, const char* name="UBTeacherBarPreviewMedia");
~UBTeacherBarPreviewMedia();
void loadMedia(QStringList pMedias);
void cleanMedia();
private:
UBWidgetList* mWidget;

Loading…
Cancel
Save