UI Nits: Use our own icons not standardIcons

.. for left and right in the calendar, since the standard ones
are pretty ugly.
This commit is contained in:
Mark Liversedge
2013-03-16 13:51:50 +00:00
parent 0106a8f754
commit b1feef1c6c
4 changed files with 6 additions and 2 deletions

View File

@@ -149,6 +149,9 @@ GcLabel::event(QEvent *e)
void
GcLabel::paintEvent(QPaintEvent *)
{
static QIcon left = iconFromPNG(":images/mac/left.png");
static QIcon right = iconFromPNG(":images/mac/right.png");
QPainter painter(this);
painter.save();
painter.setRenderHints(QPainter::Antialiasing|QPainter::TextAntialiasing, true);
@@ -187,8 +190,7 @@ GcLabel::paintEvent(QPaintEvent *)
} else {
// use standard icons
QIcon icon = text() == "<" ? style()->standardIcon(QStyle::SP_ArrowLeft) :
style()->standardIcon(QStyle::SP_ArrowRight);
QIcon &icon = text() == "<" ? left : right;
Qt::AlignmentFlag alignment = text() == "<" ? Qt::AlignLeft : Qt::AlignRight;
icon.paint(&painter, all, alignment|Qt::AlignVCenter);

View File

@@ -125,6 +125,8 @@
<file>images/mac/hide.png</file>
<file>images/mac/show.png</file>
<file>images/mac/sidebar.png</file>
<file>images/mac/left.png</file>
<file>images/mac/right.png</file>
<file>images/analysis.png</file>
<file>images/home.png</file>
<file>images/diary.png</file>

BIN
src/images/mac/left.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

BIN
src/images/mac/right.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B