From: bieber Date: Fri, 25 Jun 2010 06:56:15 +0000 (+0000) Subject: Theme Editor: Added a reset zoom button, made icons for all the zoom buttons X-Git-Url: https://repo.or.cz/w/kugel-rb.git/commitdiff_plain/45fc1b48adf9e8c75fa992646cd04d29a2eb0b10 Theme Editor: Added a reset zoom button, made icons for all the zoom buttons git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27129 a1c6a512-1295-4272-9138-f99709370657 --- diff --git a/utils/themeeditor/gui/skinviewer.cpp b/utils/themeeditor/gui/skinviewer.cpp index ade4c7fd6..95caf1e39 100644 --- a/utils/themeeditor/gui/skinviewer.cpp +++ b/utils/themeeditor/gui/skinviewer.cpp @@ -32,6 +32,8 @@ SkinViewer::SkinViewer(QWidget *parent) : this, SLOT(zoomOut())); QObject::connect(ui->zoomInButton, SIGNAL(pressed()), this, SLOT(zoomIn())); + QObject::connect(ui->zoomEvenButton, SIGNAL(pressed()), + this, SLOT(zoomEven())); ui->viewer->setDragMode(QGraphicsView::ScrollHandDrag); } @@ -67,3 +69,8 @@ void SkinViewer::zoomOut() { ui->viewer->scale(1/1.2, 1/1.2); } + +void SkinViewer::zoomEven() +{ + ui->viewer->resetTransform(); +} diff --git a/utils/themeeditor/gui/skinviewer.h b/utils/themeeditor/gui/skinviewer.h index 599a204fd..64ad219aa 100644 --- a/utils/themeeditor/gui/skinviewer.h +++ b/utils/themeeditor/gui/skinviewer.h @@ -40,6 +40,7 @@ public: public slots: void zoomIn(); void zoomOut(); + void zoomEven(); protected: void changeEvent(QEvent *e); diff --git a/utils/themeeditor/gui/skinviewer.ui b/utils/themeeditor/gui/skinviewer.ui index a5373de16..d1116888b 100644 --- a/utils/themeeditor/gui/skinviewer.ui +++ b/utils/themeeditor/gui/skinviewer.ui @@ -33,10 +33,37 @@ + + + Zoom Even + + + + :/resources/resources/zoomeven.png:/resources/resources/zoomeven.png + + + + 24 + 24 + + + + + Zoom In + + + :/resources/resources/zoomin.png:/resources/resources/zoomin.png + + + + 24 + 24 + + true @@ -47,6 +74,16 @@ Zoom Out + + + :/resources/resources/zoomout.png:/resources/resources/zoomout.png + + + + 24 + 24 + + true @@ -56,6 +93,8 @@ - + + + diff --git a/utils/themeeditor/resources.qrc b/utils/themeeditor/resources.qrc index 27d808c24..dbaeea318 100644 --- a/utils/themeeditor/resources.qrc +++ b/utils/themeeditor/resources.qrc @@ -6,6 +6,9 @@ resources/document-save.png resources/configkeys resources/deviceoptions + resources/zoomeven.png + resources/zoomin.png + resources/zoomout.png resources/render/scenebg.png diff --git a/utils/themeeditor/resources/COPYING b/utils/themeeditor/resources/COPYING index 02389762b..2b6a94c0e 100644 --- a/utils/themeeditor/resources/COPYING +++ b/utils/themeeditor/resources/COPYING @@ -1,5 +1,5 @@ -The files appicon.xcf and windowicon.png are authored by Robert Bieber, and -made available in the public domain. +The files appicon.xcf and windowicon.png, and all the magnifying glass +graphics are authored by Robert Bieber, and made available in the public domain. The files document-new.png, document-open.png, and document-save.png came from the Tango Desktop Project (http://www.tango.freedesktop.org) and are also in diff --git a/utils/themeeditor/resources/magnifyingglass.xcf b/utils/themeeditor/resources/magnifyingglass.xcf new file mode 100644 index 000000000..50babd6c1 Binary files /dev/null and b/utils/themeeditor/resources/magnifyingglass.xcf differ diff --git a/utils/themeeditor/resources/zoomeven.png b/utils/themeeditor/resources/zoomeven.png new file mode 100644 index 000000000..6da2a744e Binary files /dev/null and b/utils/themeeditor/resources/zoomeven.png differ diff --git a/utils/themeeditor/resources/zoomin.png b/utils/themeeditor/resources/zoomin.png new file mode 100644 index 000000000..2903eb3f5 Binary files /dev/null and b/utils/themeeditor/resources/zoomin.png differ diff --git a/utils/themeeditor/resources/zoomout.png b/utils/themeeditor/resources/zoomout.png new file mode 100644 index 000000000..d0cdc72e0 Binary files /dev/null and b/utils/themeeditor/resources/zoomout.png differ