added some icons for photos

This commit is contained in:
defnax 2020-03-02 21:47:18 +01:00
parent 08e3401503
commit 0529c5d1aa
7 changed files with 63 additions and 8 deletions

View File

@ -25,6 +25,11 @@
#include "retroshare/rsidentity.h" #include "retroshare/rsidentity.h"
#include "gui/gxs/GxsCommentDialog.h" #include "gui/gxs/GxsCommentDialog.h"
#define IMAGE_FULLSCREEN ":/icons/fullscreen.png"
#define IMAGE_FULLSCREENEXIT ":/icons/fullscreen-exit.png"
#define IMAGE_SHOW ":/icons/png/down-arrow.png"
#define IMAGE_HIDE ":/icons/png/up-arrow.png"
PhotoDialog::PhotoDialog(RsPhoto *rs_photo, const RsPhotoPhoto &photo, QWidget *parent) : PhotoDialog::PhotoDialog(RsPhoto *rs_photo, const RsPhotoPhoto &photo, QWidget *parent) :
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint),
ui(new Ui::PhotoDialog), mRsPhoto(rs_photo), mPhotoQueue(new TokenQueue(mRsPhoto->getTokenService(), this)), ui(new Ui::PhotoDialog), mRsPhoto(rs_photo), mPhotoQueue(new TokenQueue(mRsPhoto->getTokenService(), this)),
@ -76,8 +81,10 @@ void PhotoDialog::toggleDetails()
{ {
if (ui->frame_details->isVisible()) { if (ui->frame_details->isVisible()) {
ui->frame_details->setVisible(false); ui->frame_details->setVisible(false);
ui->detailsButton->setIcon(QIcon(IMAGE_SHOW));
} else { } else {
ui->frame_details->setVisible(true); ui->frame_details->setVisible(true);
ui->detailsButton->setIcon(QIcon(IMAGE_HIDE));
} }
} }
@ -182,9 +189,11 @@ void PhotoDialog::setFullScreen()
show(); show();
raise(); raise();
#endif #endif
ui->fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREENEXIT));
} else { } else {
setWindowState( windowState() ^ Qt::WindowFullScreen ); setWindowState( windowState() ^ Qt::WindowFullScreen );
show(); show();
ui->fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREEN));
} }
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>790</width> <width>790</width>
<height>824</height> <height>509</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -52,11 +52,24 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>558</width> <width>540</width>
<height>551</height> <height>318</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QLabel" name="label_Photo"> <widget class="QLabel" name="label_Photo">
<property name="sizePolicy"> <property name="sizePolicy">
@ -74,8 +87,24 @@
<property name="text"> <property name="text">
<string>TextLabel</string> <string>TextLabel</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
@ -92,8 +121,8 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/images/window_fullscreen.png</normaloff>:/images/window_fullscreen.png</iconset> <normaloff>:/icons/fullscreen.png</normaloff>:/icons/fullscreen.png</iconset>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
<bool>true</bool> <bool>true</bool>
@ -103,7 +132,11 @@
<item> <item>
<widget class="QPushButton" name="detailsButton"> <widget class="QPushButton" name="detailsButton">
<property name="text"> <property name="text">
<string>Details \/</string> <string>Details</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/down-arrow.png</normaloff>:/icons/png/down-arrow.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -136,6 +169,10 @@
<property name="text"> <property name="text">
<string>&lt;N&gt; Comments &gt;&gt;</string> <string>&lt;N&gt; Comments &gt;&gt;</string>
</property> </property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/comment.png</normaloff>:/icons/png/comment.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -255,6 +292,7 @@
</widget> </widget>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -22,6 +22,9 @@
#include "gui/PhotoShare/PhotoDrop.h" #include "gui/PhotoShare/PhotoDrop.h"
#include "gui/gxs/GxsIdDetails.h" #include "gui/gxs/GxsIdDetails.h"
#define IMAGE_FULLSCREEN ":/icons/fullscreen.png"
#define IMAGE_FULLSCREENEXIT ":/icons/fullscreen-exit.png"
#include <iostream> #include <iostream>
/** Constructor */ /** Constructor */
@ -300,10 +303,12 @@ void PhotoSlideShow::setFullScreen()
show(); show();
raise(); raise();
#endif #endif
ui.fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREENEXIT));
} else { } else {
setWindowState( windowState() ^ Qt::WindowFullScreen ); setWindowState( windowState() ^ Qt::WindowFullScreen );
show(); show();
ui.fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREEN));
} }
} }

View File

@ -98,8 +98,8 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/images/window_fullscreen.png</normaloff>:/images/window_fullscreen.png</iconset> <normaloff>:/icons/fullscreen.png</normaloff>:/icons/fullscreen.png</iconset>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
<bool>false</bool> <bool>false</bool>
@ -157,6 +157,7 @@
<resources> <resources>
<include location="Photo_images.qrc"/> <include location="Photo_images.qrc"/>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -316,5 +316,7 @@
<file>icons/textedit/smile.png</file> <file>icons/textedit/smile.png</file>
<file>icons/textedit/font-increase.png</file> <file>icons/textedit/font-increase.png</file>
<file>icons/textedit/code.png</file> <file>icons/textedit/code.png</file>
<file>icons/fullscreen.png</file>
<file>icons/fullscreen-exit.png</file>
</qresource> </qresource>
</RCC> </RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB