# HG changeset patch # User unc0rr # Date 1218125675 0 # Node ID f3c68684ef88b7329c1558182acdbbf55a2fa5c4 # Parent 2aa93ec4718b4d06de5132ccb16f87c90268e52a Finally fix save button look diff -r 2aa93ec4718b -r f3c68684ef88 QTfrontend/main.cpp --- a/QTfrontend/main.cpp Thu Aug 07 15:21:11 2008 +0000 +++ b/QTfrontend/main.cpp Thu Aug 07 16:14:35 2008 +0000 @@ -67,7 +67,8 @@ "border-width: 4px;" "border-radius: 10px;" "border-color: orange;" - "background-origin: content;" + "background-origin: margin;" + "background-position: top left;" "background-color: #00351d;" "}" "QPushButton:hover{" diff -r 2aa93ec4718b -r f3c68684ef88 QTfrontend/pages.cpp --- a/QTfrontend/pages.cpp Thu Aug 07 15:21:11 2008 +0000 +++ b/QTfrontend/pages.cpp Thu Aug 07 16:14:35 2008 +0000 @@ -202,7 +202,7 @@ GBFLayout->addWidget(FortPreview, 1, 0); pageLayout->addWidget(GBoxFort, 2, 2, 1, 2); - BtnTeamSave = addButton(tr("Save"), pageLayout, 4, 2, 1, 2); + BtnTeamSave = addButton(":/res/Save.png", pageLayout, 4, 3, true);; QDir tmpdir; tmpdir.cd(datadir->absolutePath()); @@ -620,13 +620,13 @@ QGridLayout * pageLayout = new QGridLayout(this); pageLayout->setMargin(25); - pWeapons=new SelWeaponWidget(cDefaultAmmoStore->size() - 10, this); + pWeapons = new SelWeaponWidget(cDefaultAmmoStore->size() - 10, this); pageLayout->addWidget(pWeapons, 0, 0, 1, 4); - BtnBack = addButton(tr("Back"), pageLayout, 1, 0); + BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); BtnDefault = addButton(tr("Default"), pageLayout, 1, 1); BtnDelete = addButton(tr("Delete"), pageLayout, 1, 2); - BtnSave = addButton(tr("Save"), pageLayout, 1, 3); + BtnSave = addButton(":/res/Save.png", pageLayout, 1, 3, true); } PageInGame::PageInGame(QWidget* parent) : diff -r 2aa93ec4718b -r f3c68684ef88 QTfrontend/pages.h --- a/QTfrontend/pages.h Thu Aug 07 15:21:11 2008 +0000 +++ b/QTfrontend/pages.h Thu Aug 07 16:14:35 2008 +0000 @@ -67,6 +67,10 @@ } else { const QIcon& lp=QIcon(btname); QSize sz = lp.actualSize(QSize(65535, 65535)); + if (btname == ":/res/Save.png") + { + butt->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}"); + } butt->setIcon(lp); butt->setFixedSize(sz); butt->setIconSize(sz); diff -r 2aa93ec4718b -r f3c68684ef88 QTfrontend/res/Save.png Binary file QTfrontend/res/Save.png has changed