Add "you have not joined any networks" placeholder if networks list is empty.

This commit is contained in:
Adam Ierymenko 2014-01-10 21:40:38 -08:00
parent 9e508779c2
commit d553555880
2 changed files with 70 additions and 1 deletions

View File

@ -238,6 +238,8 @@ void MainWindow::customEvent(QEvent *event)
}
}
ui->noNetworksLabel->setVisible(ui->networkListWidget->count() == 0);
if (this->myAddress.size())
ui->addressButton->setText(this->myAddress);
else ui->addressButton->setText(" ");

View File

@ -34,6 +34,73 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="noNetworksLabel">
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="64">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="64">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>You Have Not Joined Any Networks</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>25</number>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="networkListWidget">
<property name="focusPolicy">
@ -135,7 +202,7 @@ QPushButton:pressed {
s</string>
</property>
<property name="text">
<string> </string>
<string/>
</property>
<property name="flat">
<bool>true</bool>