diff options
Diffstat (limited to 'utils/themeeditor/gui')
| -rw-r--r-- | utils/themeeditor/gui/skinviewer.cpp | 7 | ||||
| -rw-r--r-- | utils/themeeditor/gui/skinviewer.h | 1 | ||||
| -rw-r--r-- | utils/themeeditor/gui/skinviewer.ui | 41 |
3 files changed, 48 insertions, 1 deletions
diff --git a/utils/themeeditor/gui/skinviewer.cpp b/utils/themeeditor/gui/skinviewer.cpp index ade4c7f..95caf1e 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 599a204..64ad219 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 a5373de..d111688 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> |