From 76eb44f51faee92476ed509b700be9bc30be08a7 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 25 Oct 2017 17:09:02 -0400 Subject: Fixed image previews with video thumbnails --- src-qt5/core/libLumina/LVideoWidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src-qt5/core/libLumina/LVideoWidget.cpp') diff --git a/src-qt5/core/libLumina/LVideoWidget.cpp b/src-qt5/core/libLumina/LVideoWidget.cpp index 14490484..b9660b10 100644 --- a/src-qt5/core/libLumina/LVideoWidget.cpp +++ b/src-qt5/core/libLumina/LVideoWidget.cpp @@ -26,3 +26,11 @@ LVideoWidget::~LVideoWidget() { void LVideoWidget::setIconSize(QSize iconSize) { iconLabel->setFixedSize(iconSize); } + +void LVideoWidget::enableIcons() { + iconLabel->enableIcons(); +} + +void LVideoWidget::disableIcons() { + iconLabel->disableIcons(); +} -- cgit From 1e4bb99764f6012260adb4192604a392bd62bf0a Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 25 Oct 2017 18:23:38 -0400 Subject: Fixed issues with previews and LVideoWidget sizing --- src-qt5/core/libLumina/LVideoWidget.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src-qt5/core/libLumina/LVideoWidget.cpp') diff --git a/src-qt5/core/libLumina/LVideoWidget.cpp b/src-qt5/core/libLumina/LVideoWidget.cpp index b9660b10..f1f74414 100644 --- a/src-qt5/core/libLumina/LVideoWidget.cpp +++ b/src-qt5/core/libLumina/LVideoWidget.cpp @@ -1,20 +1,22 @@ #include "LVideoWidget.h" -LVideoWidget::LVideoWidget(QString file, QSize iconSize, QWidget *parent) : QWidget(parent) { - flag = false; - iconLabel = new LVideoLabel(file, parent); +LVideoWidget::LVideoWidget(QString file, QSize iconSize, bool icons, QWidget *parent) : QWidget(parent) { + iconLabel = new LVideoLabel(file, icons, parent); textLabel = new QLabel(parent); layout = new QHBoxLayout(this); layout->setAlignment(Qt::AlignLeft | Qt::AlignCenter); - layout->addWidget(iconLabel); - layout->addWidget(textLabel); + layout->setContentsMargins(5,5,5,5); layout->setStretchFactor(textLabel, 1); //make sure this always occupies all extra space textLabel->setText(file.section("/", -1)); + iconLabel->setGeometry(QRect(QPoint(0,0), iconSize)); iconLabel->setFixedSize(iconSize); iconLabel->setVisible(true); textLabel->setVisible(true); + + layout->addWidget(iconLabel); + layout->addWidget(textLabel); } LVideoWidget::~LVideoWidget() { -- cgit