Theme Editor: Added a reset zoom button, made icons for all the zoom buttons
authorbieber <bieber@a1c6a512-1295-4272-9138-f99709370657>
Fri, 25 Jun 2010 06:56:15 +0000 (25 06:56 +0000)
committerbieber <bieber@a1c6a512-1295-4272-9138-f99709370657>
Fri, 25 Jun 2010 06:56:15 +0000 (25 06:56 +0000)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27129 a1c6a512-1295-4272-9138-f99709370657

utils/themeeditor/gui/skinviewer.cpp
utils/themeeditor/gui/skinviewer.h
utils/themeeditor/gui/skinviewer.ui
utils/themeeditor/resources.qrc
utils/themeeditor/resources/COPYING
utils/themeeditor/resources/magnifyingglass.xcf [new file with mode: 0644]
utils/themeeditor/resources/zoomeven.png [new file with mode: 0644]
utils/themeeditor/resources/zoomin.png [new file with mode: 0644]
utils/themeeditor/resources/zoomout.png [new file with mode: 0644]

index ade4c7f..95caf1e 100644 (file)
@@ -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();
+}
index 599a204..64ad219 100644 (file)
@@ -40,6 +40,7 @@ public:
 public slots:
     void zoomIn();
     void zoomOut();
+    void zoomEven();
 
 protected:
     void changeEvent(QEvent *e);
index a5373de..d111688 100644 (file)
       </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>
        <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>
index 27d808c..dbaeea3 100644 (file)
@@ -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>
index 0238976..2b6a94c 100644 (file)
@@ -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 (file)
index 0000000..50babd6
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 (file)
index 0000000..6da2a74
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 (file)
index 0000000..2903eb3
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 (file)
index 0000000..d0cdc72
Binary files /dev/null and b/utils/themeeditor/resources/zoomout.png differ