mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2298 from defnax/ui-fix-1
Use a progressbar instead of icon label for the status
This commit is contained in:
commit
ea062ae231
@ -875,32 +875,28 @@ void ConnectProgressDialog::setStatusMessage(uint32_t status, const QString &tit
|
||||
{
|
||||
case MESSAGE_STATUS_INPROGRESS:
|
||||
{
|
||||
QPixmap pm(":/images/graph-blue.png");
|
||||
ui->statusIcon->setPixmap(pm.scaledToWidth(40));
|
||||
ui->statusprogressBar->setStyleSheet("QProgressBar::chunk {background: #ffca18; }");
|
||||
}
|
||||
break;
|
||||
case MESSAGE_STATUS_SUCCESS:
|
||||
{
|
||||
QPixmap pm(":/images/graph-downloaded.png");
|
||||
ui->statusIcon->setPixmap(pm.scaledToWidth(40));
|
||||
ui->statusprogressBar->setStyleSheet("QProgressBar::chunk {background: #0ed145; }");
|
||||
}
|
||||
break;
|
||||
case MESSAGE_STATUS_CONFIG_ERROR:
|
||||
{
|
||||
QPixmap pm(":/images/graph-downloading.png");
|
||||
ui->statusIcon->setPixmap(pm.scaledToWidth(40));
|
||||
ui->statusprogressBar->setStyleSheet("QProgressBar::chunk {background: #800000; }");
|
||||
}
|
||||
break;
|
||||
case MESSAGE_STATUS_PEER_ERROR:
|
||||
{
|
||||
QPixmap pm(":/images/graph-checking.png");
|
||||
ui->statusIcon->setPixmap(pm.scaledToWidth(40));
|
||||
ui->statusprogressBar->setStyleSheet("QProgressBar::chunk {background: #c3c3c3; }");
|
||||
ui->statusprogressBar->setValue(0);
|
||||
}
|
||||
break;
|
||||
case MESSAGE_STATUS_UNKNOWN_ERROR:
|
||||
{
|
||||
QPixmap pm(":/images/graph-checking.png");
|
||||
ui->statusIcon->setPixmap(pm.scaledToWidth(40));
|
||||
ui->statusprogressBar->setStyleSheet("QProgressBar::chunk {background: #ffca18; }");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -251,20 +251,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="statusIcon">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="statusTitle">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@ -281,6 +267,36 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QLabel" name="statusTitle">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QProgressBar" name="statusprogressBar">
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="statusLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user