Commit bda4b918 authored by Claudio Valerio's avatar Claudio Valerio

second bad fix

parent 1d711112
...@@ -1128,8 +1128,9 @@ DelegateMediaControl::DelegateMediaControl(UBGraphicsMediaItem* pDelegated, QGra ...@@ -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() ...@@ -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() ...@@ -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() ...@@ -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) ...@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment