forked from len0rd/rockbox
Theme Editor: Implemented resizing in RBMovable subclasses. Implementation is still somewhat crash-prone, but mostly works at this point
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27729 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4b49ef2ade
commit
10b9e3b024
10 changed files with 249 additions and 38 deletions
|
@ -28,23 +28,17 @@
|
|||
RBAlbumArt::RBAlbumArt(QGraphicsItem *parent, int x, int y, int maxWidth,
|
||||
int maxHeight, int artWidth, int artHeight,
|
||||
ParseTreeNode* node, char hAlign, char vAlign)
|
||||
: RBMovable(parent), size(0, 0, maxWidth,
|
||||
maxHeight),
|
||||
artWidth(artWidth), artHeight(artHeight),
|
||||
hAlign(hAlign), vAlign(vAlign),
|
||||
: RBMovable(parent),artWidth(artWidth),
|
||||
artHeight(artHeight), hAlign(hAlign), vAlign(vAlign),
|
||||
texture(":/render/albumart.png"), node(node)
|
||||
{
|
||||
size = QRectF(0, 0, maxWidth, maxHeight);
|
||||
setFlag(ItemSendsGeometryChanges, false);
|
||||
|
||||
setPos(x, y);
|
||||
hide();
|
||||
}
|
||||
|
||||
QRectF RBAlbumArt::boundingRect() const
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
void RBAlbumArt::paint(QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue