CardInfoWidget as popup now has a card size related to the screen size
This commit is contained in:
parent
b0378544c4
commit
76c7d96310
1 changed files with 4 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
#include <QDesktopWidget>
|
||||||
#include "cardinfowidget.h"
|
#include "cardinfowidget.h"
|
||||||
#include "carditem.h"
|
#include "carditem.h"
|
||||||
#include "carddatabase.h"
|
#include "carddatabase.h"
|
||||||
|
@ -74,8 +75,9 @@ CardInfoWidget::CardInfoWidget(ResizeMode _mode, const QString &cardName, QWidge
|
||||||
textLabel->setMinimumHeight(100);
|
textLabel->setMinimumHeight(100);
|
||||||
setFixedWidth(sizeHint().width());
|
setFixedWidth(sizeHint().width());
|
||||||
} else if (mode == ModePopUp) {
|
} else if (mode == ModePopUp) {
|
||||||
setFixedWidth(350);
|
QDesktopWidget desktopWidget;
|
||||||
pixmapWidth = 250;
|
pixmapWidth = desktopWidget.screenGeometry().height() / 3 / aspectRatio;
|
||||||
|
setFixedWidth(pixmapWidth + 150);
|
||||||
} else
|
} else
|
||||||
setFixedWidth(250);
|
setFixedWidth(250);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue