forked from len0rd/rockbox
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
This commit is contained in:
parent
0db8bc4664
commit
33595878aa
9 changed files with 53 additions and 3 deletions
|
|
@ -32,6 +32,8 @@ SkinViewer::SkinViewer(QWidget *parent) :
|
||||||
this, SLOT(zoomOut()));
|
this, SLOT(zoomOut()));
|
||||||
QObject::connect(ui->zoomInButton, SIGNAL(pressed()),
|
QObject::connect(ui->zoomInButton, SIGNAL(pressed()),
|
||||||
this, SLOT(zoomIn()));
|
this, SLOT(zoomIn()));
|
||||||
|
QObject::connect(ui->zoomEvenButton, SIGNAL(pressed()),
|
||||||
|
this, SLOT(zoomEven()));
|
||||||
|
|
||||||
ui->viewer->setDragMode(QGraphicsView::ScrollHandDrag);
|
ui->viewer->setDragMode(QGraphicsView::ScrollHandDrag);
|
||||||
}
|
}
|
||||||
|
|
@ -67,3 +69,8 @@ void SkinViewer::zoomOut()
|
||||||
{
|
{
|
||||||
ui->viewer->scale(1/1.2, 1/1.2);
|
ui->viewer->scale(1/1.2, 1/1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SkinViewer::zoomEven()
|
||||||
|
{
|
||||||
|
ui->viewer->resetTransform();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void zoomIn();
|
void zoomIn();
|
||||||
void zoomOut();
|
void zoomOut();
|
||||||
|
void zoomEven();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent *e);
|
void changeEvent(QEvent *e);
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,38 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QToolButton" name="zoomInButton">
|
<widget class="QToolButton" name="zoomInButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Zoom In</string>
|
<string>Zoom In</string>
|
||||||
</property>
|
</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">
|
<property name="autoRepeat">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -47,6 +74,16 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Zoom Out</string>
|
<string>Zoom Out</string>
|
||||||
</property>
|
</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">
|
<property name="autoRepeat">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -56,6 +93,8 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../resources.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@
|
||||||
<file>resources/document-save.png</file>
|
<file>resources/document-save.png</file>
|
||||||
<file alias="configkeys">resources/configkeys</file>
|
<file alias="configkeys">resources/configkeys</file>
|
||||||
<file alias="deviceoptions">resources/deviceoptions</file>
|
<file alias="deviceoptions">resources/deviceoptions</file>
|
||||||
|
<file>resources/zoomeven.png</file>
|
||||||
|
<file>resources/zoomin.png</file>
|
||||||
|
<file>resources/zoomout.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/render">
|
<qresource prefix="/render">
|
||||||
<file alias="scenebg.png">resources/render/scenebg.png</file>
|
<file alias="scenebg.png">resources/render/scenebg.png</file>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
The files appicon.xcf and windowicon.png are authored by Robert Bieber, and
|
The files appicon.xcf and windowicon.png, and all the magnifying glass
|
||||||
made available in the public domain.
|
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 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
|
the Tango Desktop Project (http://www.tango.freedesktop.org) and are also in
|
||||||
|
|
|
||||||
BIN
utils/themeeditor/resources/magnifyingglass.xcf
Normal file
BIN
utils/themeeditor/resources/magnifyingglass.xcf
Normal file
Binary file not shown.
BIN
utils/themeeditor/resources/zoomeven.png
Normal file
BIN
utils/themeeditor/resources/zoomeven.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 KiB |
BIN
utils/themeeditor/resources/zoomin.png
Normal file
BIN
utils/themeeditor/resources/zoomin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 KiB |
BIN
utils/themeeditor/resources/zoomout.png
Normal file
BIN
utils/themeeditor/resources/zoomout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,002 B |
Loading…
Add table
Add a link
Reference in a new issue