# HG changeset patch # User unc0rr # Date 1218542752 0 # Node ID b600b0d9408c051414067fb3e52c9cc31afce876 # Parent 0d935c599fa301614ff6bc3c027d03e5c4730d84 Reorganize widgets on options page diff -r 0d935c599fa3 -r b600b0d9408c QTfrontend/main.cpp --- a/QTfrontend/main.cpp Tue Aug 12 10:02:34 2008 +0000 +++ b/QTfrontend/main.cpp Tue Aug 12 12:05:52 2008 +0000 @@ -172,7 +172,28 @@ "font: bold 14px;" "}" - "QGroupBox{" + + "IconedGroupBox{" + "border: solid;" + "border-width: 4px;" + "border-radius: 16px;" + "border-color: orange;" + "background-color: #130f2c;" + "color: orange;" + "font: bold 14px;" + "padding: 12px;" + "margin-top: 46px;" + "margin-left: 12px;" + "padding-top: 22px;" + "}" + "IconedGroupBox::title{" + "subcontrol-origin: margin;" + "subcontrol-position: top left;" + "padding-left: 82px;" + "padding-top: 26px;" + "text-align: left;" + "}" + ".QGroupBox{" "background-image: url(\":/res/panelbg.png\");" "background-position: bottom center;" "background-repeat: repeat-x;" @@ -180,20 +201,9 @@ "border-width: 4px;" "border-radius: 16px;" "border-color: orange;" - "background-color: #010101;" + "background-color: #040200;" "color: orange;" "font: bold 14px;" - "padding: 3px;" - "margin-top: 46px;" - "margin-left: 12px;" - "padding-top: 20px;" - "}" - "QGroupBox::title{" - "subcontrol-origin: margin;" - "subcontrol-position: top left;" - "padding-left: 82px;" - "padding-top: 26px;" - "text-align: left;" "}" "QCheckBox{" diff -r 0d935c599fa3 -r b600b0d9408c QTfrontend/pages.cpp --- a/QTfrontend/pages.cpp Tue Aug 12 10:02:34 2008 +0000 +++ b/QTfrontend/pages.cpp Tue Aug 12 12:05:52 2008 +0000 @@ -270,20 +270,41 @@ pageLayout->setRowStretch(3, 100); pageLayout->setRowStretch(4, 0); - teamsBox = new IconedGroupBox(this); - teamsBox->setIcon(QIcon(":/res/teamicon.png")); - teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - teamsBox->setTitle(QGroupBox::tr("Teams")); - pageLayout->addWidget(teamsBox, 0, 0, 1, 3); + + QGroupBox * gbTwoBoxes = new QGroupBox(this); + pageLayout->addWidget(gbTwoBoxes, 0, 0, 1, 3); + QHBoxLayout * gbTBLayout = new QHBoxLayout(gbTwoBoxes); + { + teamsBox = new IconedGroupBox(this); + teamsBox->setIcon(QIcon(":/res/teamicon.png")); + teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + teamsBox->setTitle(QGroupBox::tr("Teams")); + + QGridLayout * GBTlayout = new QGridLayout(teamsBox); + + BtnNewTeam = addButton(tr("New team"), GBTlayout, 1, 0); + + CBTeamName = new QComboBox(teamsBox); + GBTlayout->addWidget(CBTeamName, 0, 0, 1, 2); - QGridLayout * GBTlayout = new QGridLayout(teamsBox); - - BtnNewTeam = addButton(tr("New team"), GBTlayout, 0, 0); + BtnEditTeam = addButton(tr("Edit team"), GBTlayout, 1, 1); + pageLayout->addWidget(teamsBox, 0, 0, 1, 3); + gbTBLayout->addWidget(teamsBox); + } - CBTeamName = new QComboBox(teamsBox); - GBTlayout->addWidget(CBTeamName, 0, 1); + { + IconedGroupBox* groupWeapons = new IconedGroupBox(this); + groupWeapons->setIcon(QIcon(":/res/weaponsicon.png")); + groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + groupWeapons->setTitle(QGroupBox::tr("Weapons")); + QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); - BtnEditTeam = addButton(tr("Edit team"), GBTlayout, 0, 2); + WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0); + WeaponsName = new QComboBox(this); + WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2); + WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1); + gbTBLayout->addWidget(groupWeapons); + } AGGroupBox = new IconedGroupBox(this); AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png")); @@ -340,18 +361,6 @@ BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); - IconedGroupBox* groupWeapons = new IconedGroupBox(this); - groupWeapons->setIcon(QIcon(":/res/weaponsicon.png")); - groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - groupWeapons->setTitle(QGroupBox::tr("Weapons")); - pageLayout->addWidget(groupWeapons, 1, 0, 1, 3); - QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); - - WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 0, 0); - WeaponsName = new QComboBox(this); - WeaponsLayout->addWidget(WeaponsName, 0, 1); - WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 0, 2); - NNGroupBox = new QGroupBox(this); NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); NNGroupBox->setTitle(QGroupBox::tr("Net options")); diff -r 0d935c599fa3 -r b600b0d9408c QTfrontend/pages.h --- a/QTfrontend/pages.h Tue Aug 12 10:02:34 2008 +0000 +++ b/QTfrontend/pages.h Tue Aug 12 12:05:52 2008 +0000 @@ -65,6 +65,7 @@ if (!iconed) { butt->setFont(*font14); butt->setText(btname); + butt->setStyleSheet("background-color: #0d0544"); } else { const QIcon& lp=QIcon(btname); QSize sz = lp.actualSize(QSize(65535, 65535));