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:
parent
4e8eaafd53
commit
9fdc6a2acd
@ -52,7 +52,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>536</width>
|
<width>536</width>
|
||||||
<height>268</height>
|
<height>265</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
@ -884,9 +884,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="spacing">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
@ -901,13 +898,6 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="main_infos_button">
|
<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">
|
<property name="text">
|
||||||
<string>General</string>
|
<string>General</string>
|
||||||
</property>
|
</property>
|
||||||
@ -925,13 +915,6 @@ padding: 2px;
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="trackers_button">
|
<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">
|
<property name="text">
|
||||||
<string>Trackers</string>
|
<string>Trackers</string>
|
||||||
</property>
|
</property>
|
||||||
@ -955,13 +938,6 @@ padding: 2px;
|
|||||||
<height>24</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string>QPushButton {
|
|
||||||
border: 1px solid rgb(85, 81, 91);
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 2px;
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Peers</string>
|
<string>Peers</string>
|
||||||
</property>
|
</property>
|
||||||
@ -979,13 +955,6 @@ padding: 2px;
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="url_seeds_button">
|
<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">
|
<property name="text">
|
||||||
<string>URL seeds</string>
|
<string>URL seeds</string>
|
||||||
</property>
|
</property>
|
||||||
@ -1003,13 +972,6 @@ padding: 2px;
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="files_button">
|
<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">
|
<property name="text">
|
||||||
<string>Files</string>
|
<string>Files</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -49,13 +49,25 @@
|
|||||||
#include "TorrentFilesModel.h"
|
#include "TorrentFilesModel.h"
|
||||||
#include "peerlistwidget.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 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);}"
|
#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) {
|
PropertiesWidget::PropertiesWidget(QWidget *parent, TransferListWidget *transferList, bittorrent* BTSession): QWidget(parent), transferList(transferList), BTSession(BTSession) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
state = VISIBLE;
|
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
|
// Set Properties list model
|
||||||
PropListModel = new TorrentFilesModel();
|
PropListModel = new TorrentFilesModel();
|
||||||
filesList->setModel(PropListModel);
|
filesList->setModel(PropListModel);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user