Browse Source

use icons for PlayerListDialog buttons

1.7.x
Syping 3 years ago
parent
commit
0c02c3ce98
  1. 4
      PictureDialog.cpp
  2. 11
      PlayerListDialog.cpp
  3. 1
      PlayerListDialog.h
  4. 33
      PlayerListDialog.ui
  5. BIN
      res/add.svgz
  6. 5
      res/app.qrc
  7. 1
      res/back.svg
  8. BIN
      res/back.svgz
  9. 1
      res/next.svg
  10. BIN
      res/next.svgz

4
PictureDialog.cpp

@ -242,8 +242,8 @@ void PictureDialog::addPreviousNextButtons()
QToolBar *uiToolbar = new QToolBar("Picture Toolbar", this);
uiToolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
uiToolbar->setObjectName("uiToolbar");
uiToolbar->addAction(QIcon(":/img/back.svg"), "", this, SLOT(previousPictureRequestedSlot()));
uiToolbar->addAction(QIcon(":/img/next.svg"), "", this, SLOT(nextPictureRequestedSlot()));
uiToolbar->addAction(QIcon(":/img/back.svgz"), "", this, SLOT(previousPictureRequestedSlot()));
uiToolbar->addAction(QIcon(":/img/next.svgz"), "", this, SLOT(nextPictureRequestedSlot()));
layout()->setMenuBar(uiToolbar);
naviEnabled = true;

11
PlayerListDialog.cpp

@ -79,7 +79,9 @@ PlayerListDialog::PlayerListDialog(QStringList players, ProfileDatabase *profile
}
else
{
drawSwitchButtons();
ui->cmdMakeAv->setIcon(QIcon(":/img/back.svgz"));
ui->cmdMakeSe->setIcon(QIcon(":/img/next.svgz"));
ui->cmdMakeAd->setIcon(QIcon(":/img/add.svgz"));
}
buildInterface();
@ -101,13 +103,6 @@ PlayerListDialog::~PlayerListDialog()
delete ui;
}
void PlayerListDialog::drawSwitchButtons()
{
ui->cmdMakeAv->setText("<");
ui->cmdMakeSe->setText(">");
ui->cmdMakeAd->setText("+");
}
void PlayerListDialog::on_cmdCancel_clicked()
{
close();

1
PlayerListDialog.h

@ -48,7 +48,6 @@ private:
ProfileDatabase *profileDB;
Ui::PlayerListDialog *ui;
bool listUpdated;
void drawSwitchButtons();
void buildInterface();
signals:

33
PlayerListDialog.ui

@ -50,32 +50,39 @@
</spacer>
</item>
<item>
<widget class="QToolButton" name="cmdMakeSe"/>
<widget class="QPushButton" name="cmdMakeSe">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="cmdMakeAv">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QPushButton" name="cmdMakeAv">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string/>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="cmdMakeAd">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QPushButton" name="cmdMakeAd">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string/>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>

BIN
res/add.svgz

Binary file not shown.

5
res/app.qrc

@ -9,12 +9,13 @@
<file>5sync-96.png</file>
<file>5sync-128.png</file>
<file>5sync-256.png</file>
<file>add.svgz</file>
<file>avatararea.png</file>
<file>avatarareaimport.png</file>
<file>back.svg</file>
<file>back.svgz</file>
<file>empty1x16.png</file>
<file>mappreview.jpg</file>
<file>next.svg</file>
<file>next.svgz</file>
<file>pointmaker-8.png</file>
<file>pointmaker-16.png</file>
<file>pointmaker-24.png</file>

1
res/back.svg

@ -1 +0,0 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="352,115.4 331.3,96 160,256 331.3,416 352,396.7 201.5,256 "/></svg>

Before

Width:  |  Height:  |  Size: 430 B

BIN
res/back.svgz

Binary file not shown.

1
res/next.svg

@ -1 +0,0 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "/></svg>

Before

Width:  |  Height:  |  Size: 430 B

BIN
res/next.svgz

Binary file not shown.
Loading…
Cancel
Save