1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 23:07:59 +00:00

Flat buttons in status bar should never get focus

This commit is contained in:
Christophe Dumez 2010-04-07 08:19:17 +00:00
parent ae3c50c074
commit 76eb93ba1a

View File

@ -80,18 +80,21 @@ public:
//dlSpeedLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); //dlSpeedLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
connect(dlSpeedLbl, SIGNAL(clicked()), this, SLOT(capDownloadSpeed())); connect(dlSpeedLbl, SIGNAL(clicked()), this, SLOT(capDownloadSpeed()));
dlSpeedLbl->setFlat(true); dlSpeedLbl->setFlat(true);
dlSpeedLbl->setFocusPolicy(Qt::NoFocus);
altSpeedsBtn = new QPushButton(); altSpeedsBtn = new QPushButton();
altSpeedsBtn->setFixedWidth(22); altSpeedsBtn->setFixedWidth(22);
altSpeedsBtn->setFlat(true);
altSpeedsBtn->setFocusPolicy(Qt::NoFocus);
updateAltSpeedsBtn(Preferences::isAltBandwidthEnabled()); updateAltSpeedsBtn(Preferences::isAltBandwidthEnabled());
connect(altSpeedsBtn, SIGNAL(clicked()), this, SLOT(toggleAlternativeSpeeds())); connect(altSpeedsBtn, SIGNAL(clicked()), this, SLOT(toggleAlternativeSpeeds()));
altSpeedsBtn->setFlat(true);
upSpeedLbl = new QPushButton(tr("U: %1 B/s - T: %2", "Upload speed: x B/s - Transferred: x MiB").arg("0.0").arg(misc::friendlyUnit(0))); upSpeedLbl = new QPushButton(tr("U: %1 B/s - T: %2", "Upload speed: x B/s - Transferred: x MiB").arg("0.0").arg(misc::friendlyUnit(0)));
//upSpeedLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); //upSpeedLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
connect(upSpeedLbl, SIGNAL(clicked()), this, SLOT(capUploadSpeed())); connect(upSpeedLbl, SIGNAL(clicked()), this, SLOT(capUploadSpeed()));
upSpeedLbl->setFlat(true); upSpeedLbl->setFlat(true);
upSpeedLbl->setFocusPolicy(Qt::NoFocus);
DHTLbl = new QLabel(tr("DHT: %1 nodes").arg(0)); DHTLbl = new QLabel(tr("DHT: %1 nodes").arg(0));
DHTLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); DHTLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
statusSep1 = new QFrame(); statusSep1 = new QFrame();