second bad fix

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 1d7111122b
commit bda4b91871
  1. 15
      src/domain/UBGraphicsItemDelegate.cpp

@ -1128,8 +1128,9 @@ DelegateMediaControl::DelegateMediaControl(UBGraphicsMediaItem* pDelegated, QGra
setPen(Qt::NoPen); setPen(Qt::NoPen);
setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control));
lcdTimer = new MediaTimer(this); lcdTimer = 0;
lcdTimer->init(); //lcdTimer = new MediaTimer(this);
//lcdTimer->init();
update(); update();
} }
@ -1180,8 +1181,8 @@ void DelegateMediaControl::positionHandles()
{ {
mLCDTimerArea.setWidth(parentItem()->boundingRect().height()); mLCDTimerArea.setWidth(parentItem()->boundingRect().height());
mLCDTimerArea.setHeight(parentItem()->boundingRect().height()); mLCDTimerArea.setHeight(parentItem()->boundingRect().height());
lcdTimer->setRect(mLCDTimerArea); //lcdTimer->setRect(mLCDTimerArea);
lcdTimer->setPos(mSeecArea.width()-mLCDTimerArea.width(),0); //lcdTimer->setPos(mSeecArea.width()-mLCDTimerArea.width(),0);
mSeecArea.setWidth(rect().width()-mLCDTimerArea.width()); mSeecArea.setWidth(rect().width()-mLCDTimerArea.width());
@ -1189,7 +1190,7 @@ void DelegateMediaControl::positionHandles()
selfRect.setHeight(parentItem()->boundingRect().height()); selfRect.setHeight(parentItem()->boundingRect().height());
setRect(selfRect); setRect(selfRect);
lcdTimer->setPos(rect().width() - mLCDTimerArea.width(), 0); //lcdTimer->setPos(rect().width() - mLCDTimerArea.width(), 0);
} }
@ -1197,7 +1198,7 @@ void DelegateMediaControl::update()
{ {
QTime t; QTime t;
t = t.addMSecs(mCurrentTimeInMs < 0 ? 0 : mCurrentTimeInMs); t = t.addMSecs(mCurrentTimeInMs < 0 ? 0 : mCurrentTimeInMs);
lcdTimer->display(t.toString("m:ss")); //lcdTimer->display(t.toString("m:ss"));
QGraphicsRectItem::update(); QGraphicsRectItem::update();
} }
@ -1249,7 +1250,7 @@ void DelegateMediaControl::seekToMousePos(QPointF mousePos)
qreal frameWidth = rect().height() / 2; qreal frameWidth = rect().height() / 2;
minX = frameWidth; minX = frameWidth;
length = mSeecArea.width() - lcdTimer->rect().width(); length = mSeecArea.width() /*- lcdTimer->rect().width()*/;
qreal mouseX = mousePos.x(); qreal mouseX = mousePos.x();
if (mouseX >= (mSeecArea.width() - mSeecArea.height()/2)) if (mouseX >= (mSeecArea.width() - mSeecArea.height()/2))

Loading…
Cancel
Save