diff --git a/gui/LegacyModEditDialog.ui b/gui/LegacyModEditDialog.ui index 3ab946d97..bb0d9ef25 100644 --- a/gui/LegacyModEditDialog.ui +++ b/gui/LegacyModEditDialog.ui @@ -92,11 +92,8 @@ - - QFrame::StyledPanel - - QFrame::Raised + QFrame::Plain diff --git a/gui/MCModInfoFrame.cpp b/gui/MCModInfoFrame.cpp index 15ead7ab4..a0458cbcf 100644 --- a/gui/MCModInfoFrame.cpp +++ b/gui/MCModInfoFrame.cpp @@ -23,34 +23,27 @@ void MCModInfoFrame::updateWithMod(Mod &m) return; } - QString missing = tr("Missing from mcmod.info"); + QString text = ""; + if(m.homeurl().isEmpty()) text = m.name(); + else text = "" + m.name() + ""; + if(!m.authors().isEmpty()) text += " by " + m.authors(); - QString name = m.name(); - if(name.isEmpty()) name = missing; - QString description = m.description(); - if(description.isEmpty()) description = missing; - QString authors = m.authors(); - if(authors.isEmpty()) authors = missing; - QString credits = m.credits(); - if(credits.isEmpty()) credits = missing; - QString website = m.homeurl(); - if(website.isEmpty()) website = missing; - else website = "" + website + ""; + setModText(text); - setName(name); - setDescription(description); - setAuthors(authors); - setCredits(credits); - setWebsite(website); + if(m.description().isEmpty()) + { + setModDescription(tr("No description provided in mcmod.info")); + } + else + { + setModDescription(m.description()); + } } void MCModInfoFrame::clear() { - setName(tr("Select a mod to view information...")); - setDescription(tr("Mod description")); - setAuthors(tr("Mod authors")); - setCredits(tr("Mod credits")); - setWebsite(tr("Mod website")); + setModText(tr("Select a mod to view title and authors...")); + setModDescription(tr("Select a mod to view description...")); } MCModInfoFrame::MCModInfoFrame(QWidget *parent) : @@ -65,31 +58,12 @@ MCModInfoFrame::~MCModInfoFrame() delete ui; } -void MCModInfoFrame::setName(QString name) +void MCModInfoFrame::setModText(QString text) { - ui->label_Name->setText(name); - //ui->label_Name->setToolTip(name); + ui->label_ModText->setText(text); } -void MCModInfoFrame::setDescription(QString description) +void MCModInfoFrame::setModDescription(QString text) { - ui->label_Description->setText(description); - //ui->label_Description->setToolTip(description); -} - -void MCModInfoFrame::setAuthors(QString authors) -{ - ui->label_Authors->setText(authors); - //ui->label_Authors->setToolTip(authors); -} - -void MCModInfoFrame::setCredits(QString credits) -{ - ui->label_Credits->setText(credits); - //ui->label_Credits->setToolTip(credits); -} - -void MCModInfoFrame::setWebsite(QString website) -{ - ui->label_Website->setText(website); + ui->label_ModDescription->setText(text); } diff --git a/gui/MCModInfoFrame.h b/gui/MCModInfoFrame.h index 01812df79..cdf399cb4 100644 --- a/gui/MCModInfoFrame.h +++ b/gui/MCModInfoFrame.h @@ -31,11 +31,8 @@ public: explicit MCModInfoFrame(QWidget *parent = 0); ~MCModInfoFrame(); - void setName(QString name); - void setDescription(QString description); - void setAuthors(QString authors); - void setCredits(QString credits); - void setWebsite(QString website); + void setModText(QString text); + void setModDescription(QString text); void updateWithMod(Mod &m); void clear(); diff --git a/gui/MCModInfoFrame.ui b/gui/MCModInfoFrame.ui index 41902c1a6..b24251aea 100644 --- a/gui/MCModInfoFrame.ui +++ b/gui/MCModInfoFrame.ui @@ -2,202 +2,76 @@ MCModInfoFrame + + + 0 + 0 + 527 + 68 + + + + + 0 + 0 + + + + + 16777215 + 120 + + Frame - + - - - - - - 0 - 0 - - - - - 250 - 0 - - - - - 16777215 - 92 - - - - - 75 - true - - - - Select a mod to view information... - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - - 0 - 0 - - - - - 250 - 0 - - - - - 16777215 - 92 - - - - Mod description - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - - - QLayout::SetDefaultConstraint + + + + 0 + 0 + - - QFormLayout::AllNonFixedFieldsGrow + + Select a mod to view title and authors... - + + Qt::RichText + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - Authors: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 200 - 0 - - - - - 16777215 - 92 - - - - Mod authors - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - Website: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 200 - 0 - - - - - 16777215 - 92 - - - - Mod website - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - true - - - - - - - - 200 - 0 - - - - - 16777215 - 92 - - - - Mod credits - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - Credits: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - + + true + + + true + + + + + + + + 0 + 0 + + + + Select a mod to view description... + + + Qt::PlainText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + diff --git a/gui/OneSixModEditDialog.ui b/gui/OneSixModEditDialog.ui index 675a6faa2..6d70200a8 100644 --- a/gui/OneSixModEditDialog.ui +++ b/gui/OneSixModEditDialog.ui @@ -222,11 +222,11 @@ - - QFrame::StyledPanel - - - QFrame::Raised + + + 0 + 0 +