Skip to content

Commit

Permalink
Fix summary page layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kz26 committed Dec 10, 2013
1 parent a871f31 commit 5ff9071
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 38 deletions.
11 changes: 6 additions & 5 deletions summarypage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ SummaryPage::SummaryPage(QWidget *parent) :
}

void SummaryPage::initializePage() {
ui->summaryTextBox->clear();
QString inputPath = field("inputPath").toString();
ui->summaryTextBox->append(QString("<b>Input path:</b> %1\n").arg(inputPath));
if (QFileInfo(inputPath).isDir())
Expand All @@ -59,14 +60,14 @@ void SummaryPage::initializePage() {

int pieceSizeIndex = field("pieceSize").toInt();
int pieceSize;
if(pieceSizeIndex == 0)
if(pieceSizeIndex == 0) {
pieceSize = 0;
else
pieceSize = 1024 * (2 << (pieceSizeIndex + 2));
if (pieceSize == 0)
ui->summaryTextBox->append(QString("<b>Piece size:</b> Auto\n"));
else
}
else {
pieceSize = 1024 * (2 << (pieceSizeIndex + 2));
ui->summaryTextBox->append(QString("<b>Piece size:</b> %1 KB\n").arg(pieceSize));
}
ui->summaryTextBox->append(QString("<b>Include file modification times:</b> %1\n").arg(field("includeFileModTimes").toString()));
ui->summaryTextBox->append(QString("<b>Private torrent:</b> %1\n").arg(field("privateTorrent").toString()));

Expand Down
56 changes: 23 additions & 33 deletions summarypage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,29 @@
<property name="windowTitle">
<string>WizardPage</string>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>141</width>
<height>17</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Summary</string>
</property>
</widget>
<widget class="QTextEdit" name="summaryTextBox">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>381</width>
<height>221</height>
</rect>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Summary</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="summaryTextBox">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
Expand Down

0 comments on commit 5ff9071

Please sign in to comment.