diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-25 18:27:52 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-25 18:27:52 -0400 |
commit | c52596a4d90e681b394e4c212592f26275d74bae (patch) | |
tree | 6264e2caf978da7e09d749c923821e3d8132bd10 /src-qt5/core/libLumina/LVideoWidget.cpp | |
parent | Re-enable the "Root Mode" warning at the top of lumina-fm, and setup the root... (diff) | |
parent | Fixed issues with previews and LVideoWidget sizing (diff) | |
download | lumina-c52596a4d90e681b394e4c212592f26275d74bae.tar.gz lumina-c52596a4d90e681b394e4c212592f26275d74bae.tar.bz2 lumina-c52596a4d90e681b394e4c212592f26275d74bae.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/libLumina/LVideoWidget.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LVideoWidget.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src-qt5/core/libLumina/LVideoWidget.cpp b/src-qt5/core/libLumina/LVideoWidget.cpp index 14490484..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() { @@ -26,3 +28,11 @@ LVideoWidget::~LVideoWidget() { void LVideoWidget::setIconSize(QSize iconSize) { iconLabel->setFixedSize(iconSize); } + +void LVideoWidget::enableIcons() { + iconLabel->enableIcons(); +} + +void LVideoWidget::disableIcons() { + iconLabel->disableIcons(); +} |