- Second attempt to fix buttons layout on Mac OS

This commit is contained in:
Christophe Dumez 2009-11-17 08:32:52 +00:00
parent 4e8eaafd53
commit 9fdc6a2acd
2 changed files with 13 additions and 39 deletions

View file

@ -49,13 +49,25 @@
#include "TorrentFilesModel.h"
#include "peerlistwidget.h"
#ifdef Q_WS_MAC
#define DEFAULT_BUTTON_CSS ""
#define SELECTED_BUTTON_CSS "background-color: rgb(255, 208, 105);}"
#else
#define DEFAULT_BUTTON_CSS "QPushButton {border: 1px solid rgb(85, 81, 91);border-radius: 3px;padding: 2px;}"
#define SELECTED_BUTTON_CSS "QPushButton {border: 1px solid rgb(85, 81, 91);border-radius: 3px;padding: 2px;background-color: rgb(255, 208, 105);}"
#endif
PropertiesWidget::PropertiesWidget(QWidget *parent, TransferListWidget *transferList, bittorrent* BTSession): QWidget(parent), transferList(transferList), BTSession(BTSession) {
setupUi(this);
state = VISIBLE;
// Buttons stylesheet
trackers_button->setStyleSheet(DEFAULT_BUTTON_CSS);
peers_button->setStyleSheet(DEFAULT_BUTTON_CSS);
url_seeds_button->setStyleSheet(DEFAULT_BUTTON_CSS);
files_button->setStyleSheet(DEFAULT_BUTTON_CSS);
main_infos_button->setStyleSheet(DEFAULT_BUTTON_CSS);
// Set Properties list model
PropListModel = new TorrentFilesModel();
filesList->setModel(PropListModel);