Skip to content

Commit 7dc91da

Browse files
committed
Icon update
1 parent 7944b1e commit 7dc91da

File tree

8 files changed

+30
-13
lines changed

8 files changed

+30
-13
lines changed

Ressources/Pin-v2.png

-8.79 KB
Loading

Ressources/Pin-v2.psd

-654 KB
Binary file not shown.

Ressources/Pin.png

-20.6 KB
Loading

Ressources/Pin.psd

-701 KB
Binary file not shown.

src/bucket.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ void Bucket::InitializeClip() {
5555
//listWidget->verticalScrollBar()->setStyleSheet("QScrollBar:vertical { width: 100px; }");
5656
listWidget->setIconSize(QSize(this->width - (this->width * 0.12), this->height));
5757
//listWidget->setIconSize(QSize(300, 400));
58+
listWidget->setDragEnabled(true);
59+
listWidget->setDragDropMode(QAbstractItemView::DragDrop);
5860
listWidget->setResizeMode(QListWidget::Adjust);
61+
listWidget->setMovement(QListView::Snap);
5962
listWidget->setStyleSheet(QString("background-color: rgba(42, 41, 44, 255); border-color: rgba(42, 41, 44, 255);"));
6063
// listWidget->setStyleSheet(QString("background-color: rgba(255,255,255,255); border-color: rgba(255,255,255,255);"));
6164
// listWidget->setStyleSheet(QString("border-color: rgba(40, 40, 40, 191);"));
@@ -236,6 +239,7 @@ void Bucket::createData(const QString &mimeType)
236239

237240
void Bucket::startDrag()
238241
{
242+
qDebug() << "Drag start";
239243
mimeData = new MimeData;
240244

241245
connect(mimeData, SIGNAL(dataRequested(QString)),

src/bucket.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public slots:
7676

7777
protected:
7878
virtual void enterEvent(QEvent* e);
79-
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
80-
void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE;
81-
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
79+
void dropEvent(QDropEvent *event) override;
80+
void dragLeaveEvent(QDragLeaveEvent *event) override;
81+
void mousePressEvent(QMouseEvent *event) override;
8282

8383
public:
8484
QDir workingDirectory;

src/node.ui

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
<height>291</height>
3232
</rect>
3333
</property>
34+
<property name="sizePolicy">
35+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
36+
<horstretch>0</horstretch>
37+
<verstretch>0</verstretch>
38+
</sizepolicy>
39+
</property>
3440
<property name="acceptDrops">
3541
<bool>true</bool>
3642
</property>
@@ -40,6 +46,9 @@
4046
<property name="text">
4147
<string/>
4248
</property>
49+
<property name="scaledContents">
50+
<bool>true</bool>
51+
</property>
4352
</widget>
4453
</widget>
4554
<resources/>

src/nodewidget.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ void NodeWidget::SetNodeImage(QString fileName) {
6969
mypix = mypix.scaledToWidth(_size,Qt::SmoothTransformation);
7070
ui->label->setPixmap(mypix);
7171
ui->label->adjustSize();
72+
7273
this->resize(this->size());
7374

7475
//Open animation
@@ -292,19 +293,22 @@ void NodeWidget::enterEvent(QEvent* e) {
292293
QWidget::enterEvent(e);
293294

294295
//_radius += _radius*int(50/100);
296+
// float value = 100;
297+
298+
// QPropertyAnimation* animation = new QPropertyAnimation(this, "geometry");
299+
// animation->setDuration(500);
300+
// animation->setStartValue(QRect(0, 0, 100, 30));
301+
// animation->setEndValue(QRect(250, 250, 100, 30));
295302

296-
/*QPropertyAnimation animation(this, "geometry");
297-
animation.setDuration(500);
298-
animation.setStartValue(this->rect());
299-
auto rect = this->rect();
300-
rect.setX(rect.x() - value);
301-
rect.setY(rect.y() - value);
302-
rect.setWidth(rect.width() + value);
303-
rect.setHeight(rect.height() + value);
303+
// auto rect = this->rect();
304+
// rect.setX(this->pos().x() - value);
305+
// rect.setY(this->pos().y() - value);
306+
// rect.setWidth(this->rect().width() + value);
307+
// rect.setHeight(this->rect().height() + value);
304308

305-
animation.setEndValue(rect);
309+
// //animation.setEndValue(rect);
306310

307-
animation.start();*/
311+
// animation->start();
308312
}
309313

310314
void NodeWidget::leaveEvent(QEvent* e) {

0 commit comments

Comments
 (0)