summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-25 06:56:15 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-25 06:56:15 +0000
commit33595878aa2217d73ecfa2324bea2b25c70bcfc2 (patch)
tree3555ccabd49e730a18e18dd66d94e3f598389c94
parent0db8bc4664cd12ea406a905d7a4237992f393753 (diff)
downloadrockbox-33595878aa2217d73ecfa2324bea2b25c70bcfc2.tar.gz
rockbox-33595878aa2217d73ecfa2324bea2b25c70bcfc2.zip
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
-rw-r--r--utils/themeeditor/gui/skinviewer.cpp7
-rw-r--r--utils/themeeditor/gui/skinviewer.h1
-rw-r--r--utils/themeeditor/gui/skinviewer.ui41
-rw-r--r--utils/themeeditor/resources.qrc3
-rw-r--r--utils/themeeditor/resources/COPYING4
-rw-r--r--utils/themeeditor/resources/magnifyingglass.xcfbin0 -> 2685 bytes
-rw-r--r--utils/themeeditor/resources/zoomeven.pngbin0 -> 1035 bytes
-rw-r--r--utils/themeeditor/resources/zoomin.pngbin0 -> 1024 bytes
-rw-r--r--utils/themeeditor/resources/zoomout.pngbin0 -> 1002 bytes
9 files changed, 53 insertions, 3 deletions
diff --git a/utils/themeeditor/gui/skinviewer.cpp b/utils/themeeditor/gui/skinviewer.cpp
index ade4c7fd60..95caf1e393 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 599a204fd7..64ad219aae 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 a5373de160..d1116888b9 100644
--- a/utils/themeeditor/gui/skinviewer.ui
+++ b/utils/themeeditor/gui/skinviewer.ui
@@ -33,10 +33,37 @@
</spacer>
</item>
<item>
+ <widget class="QToolButton" name="zoomEvenButton">
+ <property name="text">
+ <string>Zoom Even</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../resources.qrc">
+ <normaloff>:/resources/resources/zoomeven.png</normaloff>:/resources/resources/zoomeven.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QToolButton" name="zoomInButton">
<property name="text">
<string>Zoom In</string>
</property>
+ <property name="icon">
+ <iconset resource="../resources.qrc">
+ <normaloff>:/resources/resources/zoomin.png</normaloff>:/resources/resources/zoomin.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="autoRepeat">
<bool>true</bool>
</property>
@@ -47,6 +74,16 @@
<property name="text">
<string>Zoom Out</string>
</property>
+ <property name="icon">
+ <iconset resource="../resources.qrc">
+ <normaloff>:/resources/resources/zoomout.png</normaloff>:/resources/resources/zoomout.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="autoRepeat">
<bool>true</bool>
</property>
@@ -56,6 +93,8 @@
</item>
</layout>
</widget>
- <resources/>
+ <resources>
+ <include location="../resources.qrc"/>
+ </resources>
<connections/>
</ui>
diff --git a/utils/themeeditor/resources.qrc b/utils/themeeditor/resources.qrc
index 27d808c240..dbaeea3185 100644
--- a/utils/themeeditor/resources.qrc
+++ b/utils/themeeditor/resources.qrc
@@ -6,6 +6,9 @@
<file>resources/document-save.png</file>
<file alias="configkeys">resources/configkeys</file>
<file alias="deviceoptions">resources/deviceoptions</file>
+ <file>resources/zoomeven.png</file>
+ <file>resources/zoomin.png</file>
+ <file>resources/zoomout.png</file>
</qresource>
<qresource prefix="/render">
<file alias="scenebg.png">resources/render/scenebg.png</file>
diff --git a/utils/themeeditor/resources/COPYING b/utils/themeeditor/resources/COPYING
index 02389762b0..2b6a94c0e4 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 0000000000..50babd6c1f
--- /dev/null
+++ b/utils/themeeditor/resources/magnifyingglass.xcf
Binary files differ
diff --git a/utils/themeeditor/resources/zoomeven.png b/utils/themeeditor/resources/zoomeven.png
new file mode 100644
index 0000000000..6da2a744e8
--- /dev/null
+++ b/utils/themeeditor/resources/zoomeven.png
Binary files differ
diff --git a/utils/themeeditor/resources/zoomin.png b/utils/themeeditor/resources/zoomin.png
new file mode 100644
index 0000000000..2903eb3f5e
--- /dev/null
+++ b/utils/themeeditor/resources/zoomin.png
Binary files differ
diff --git a/utils/themeeditor/resources/zoomout.png b/utils/themeeditor/resources/zoomout.png
new file mode 100644
index 0000000000..d0cdc72e03
--- /dev/null
+++ b/utils/themeeditor/resources/zoomout.png
Binary files differ