1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 12:34:19 +00:00

- 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

@ -52,7 +52,7 @@
<x>0</x>
<y>0</y>
<width>536</width>
<height>268</height>
<height>265</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
@ -884,9 +884,6 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>9</number>
</property>
<property name="leftMargin">
<number>5</number>
</property>
@ -901,13 +898,6 @@
</property>
<item>
<widget class="QPushButton" name="main_infos_button">
<property name="styleSheet">
<string>QPushButton {
border: 1px solid rgb(85, 81, 91);
border-radius: 3px;
padding: 2px;
}</string>
</property>
<property name="text">
<string>General</string>
</property>
@ -925,13 +915,6 @@ padding: 2px;
</item>
<item>
<widget class="QPushButton" name="trackers_button">
<property name="styleSheet">
<string>QPushButton {
border: 1px solid rgb(85, 81, 91);
border-radius: 3px;
padding: 2px;
}</string>
</property>
<property name="text">
<string>Trackers</string>
</property>
@ -955,13 +938,6 @@ padding: 2px;
<height>24</height>
</size>
</property>
<property name="styleSheet">
<string>QPushButton {
border: 1px solid rgb(85, 81, 91);
border-radius: 3px;
padding: 2px;
}</string>
</property>
<property name="text">
<string>Peers</string>
</property>
@ -979,13 +955,6 @@ padding: 2px;
</item>
<item>
<widget class="QPushButton" name="url_seeds_button">
<property name="styleSheet">
<string>QPushButton {
border: 1px solid rgb(85, 81, 91);
border-radius: 3px;
padding: 2px;
}</string>
</property>
<property name="text">
<string>URL seeds</string>
</property>
@ -1003,13 +972,6 @@ padding: 2px;
</item>
<item>
<widget class="QPushButton" name="files_button">
<property name="styleSheet">
<string>QPushButton {
border: 1px solid rgb(85, 81, 91);
border-radius: 3px;
padding: 2px;
}</string>
</property>
<property name="text">
<string>Files</string>
</property>

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);