titleLabel->setText(title);
titleLabel->setVisible(window()->height() > 100);
- const int maxDescLength = 400;
+ const int maxDescLength = 500;
QString videoDesc = video->getDescription();
if (videoDesc.length() > maxDescLength) {
progressBar->setValue(0);
}
-void LoadingWidget::bufferStatus(int percent) {
- if (startTime.elapsed() > 2000 && percent > progressBar->value())
+void LoadingWidget::bufferStatus(qreal value) {
+ int percent = value * 100.;
+ if (startTime.elapsed() > 1000 && percent > progressBar->value())
progressBar->setValue(percent);
}
layout()->setMargin(spacing);
titleLabel->setFont(f);
- f.setPixelSize(f.pixelSize() / 2);
- descriptionLabel->setFont(f);
+ QFont descFont = descriptionLabel->font();
+ descFont.setPixelSize(f.pixelSize() / 2);
+ descriptionLabel->setFont(descFont);
}
void LoadingWidget::clear() {