Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

Commit

Permalink
Fixed thumbs size on GNOME
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Mar 11, 2012
1 parent 5b8a9a0 commit f94e4c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/iconswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ IconsWidget::IconsWidget(QWidget *parent) :
toolTip = new QLabel();
toolTip->setWindowFlags(Qt::SplashScreen);
setMouseTracking(true);
setFixedHeight(100);
}

void IconsWidget::setPaths(const QString &pathIn,const QString &pathOut,const bool compare)
Expand Down Expand Up @@ -125,8 +126,8 @@ void IconsWidget::paintEvent(QPaintEvent *)
}

if (compareView) {
renderSvg(inpath, &painter,QRect(0,0,height(),height()));
renderSvg(outpath,&painter,QRect(105,0,height(),height()));
renderSvg(inpath, &painter,QRect(0,0,100,100));
renderSvg(outpath,&painter,QRect(105,0,100,100));
} else {
renderSvg(outpath,&painter,QRect(0,0,width(),height()));
}
Expand All @@ -139,7 +140,7 @@ void IconsWidget::renderSvg(const QString path, QPainter *painter, QRect rect)
size.scale(rect.width(),rect.height(),Qt::KeepAspectRatio);
int border = 3;
renderer.render(painter,QRect(rect.x()+border,(rect.height()-size.height())/2+rect.y()+border,
size.width()-border,size.height()-border));
size.width()-border*2,size.height()-border*2));
}

void IconsWidget::mousePressEvent(QMouseEvent *event)
Expand Down
6 changes: 3 additions & 3 deletions src/thumbwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>488</width>
<height>112</height>
<width>269</width>
<height>116</height>
</rect>
</property>
<property name="sizePolicy">
Expand Down Expand Up @@ -214,7 +214,7 @@
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
<height>100</height>
</size>
</property>
<property name="maximumSize">
Expand Down

0 comments on commit f94e4c0

Please sign in to comment.