1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Add tooltip in filetransferwidget

It is not clear what they are doing buttons
This commit is contained in:
PKEv 2015-03-28 21:16:58 +03:00 committed by tux3
parent 96e0f0d502
commit 137d1ae2d5

View File

@ -347,10 +347,12 @@ void FileTransferWidget::onFileTransferFinished(ToxFile file)
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/yes.svg"));
ui->topButton->setObjectName("ok");
ui->topButton->setToolTip(tr("Open file."));
ui->topButton->show();
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/dir.svg"));
ui->bottomButton->setObjectName("dir");
ui->bottomButton->setToolTip(tr("Open file directory."));
ui->bottomButton->show();
// preview
@ -395,9 +397,11 @@ void FileTransferWidget::setupButtons()
case ToxFile::TRANSMITTING:
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/no.svg"));
ui->topButton->setObjectName("cancel");
ui->topButton->setToolTip(tr("Cancel transmit."));
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/pause.svg"));
ui->bottomButton->setObjectName("pause");
ui->bottomButton->setToolTip(tr("Pause transmit."));
setButtonColor(Style::getColor(Style::Green));
@ -405,9 +409,11 @@ void FileTransferWidget::setupButtons()
case ToxFile::PAUSED:
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/no.svg"));
ui->topButton->setObjectName("cancel");
ui->topButton->setToolTip(tr("Cancel transmit."));
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/arrow_white.svg"));
ui->bottomButton->setObjectName("resume");
ui->bottomButton->setToolTip(tr("Resume transmit."));
setButtonColor(Style::getColor(Style::LightGrey));
@ -416,16 +422,19 @@ void FileTransferWidget::setupButtons()
case ToxFile::BROKEN: //TODO: ?
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/no.svg"));
ui->topButton->setObjectName("cancel");
ui->topButton->setToolTip(tr("Cancel transmit."));
if(fileInfo.direction == ToxFile::SENDING)
{
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/pause.svg"));
ui->bottomButton->setObjectName("pause");
ui->bottomButton->setToolTip(tr("Pause transmit."));
}
else
{
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/yes.svg"));
ui->bottomButton->setObjectName("accept");
ui->bottomButton->setToolTip(tr("Accept transmit"));
}
break;
}