83 connect(txtFilter, SIGNAL(moveLeft()), this, SLOT(moveLeft())); |
84 connect(txtFilter, SIGNAL(moveLeft()), this, SLOT(moveLeft())); |
84 connect(txtFilter, SIGNAL(moveRight()), this, SLOT(moveRight())); |
85 connect(txtFilter, SIGNAL(moveRight()), this, SLOT(moveRight())); |
85 |
86 |
86 // Filter label |
87 // Filter label |
87 QLabel * lblFilter = new QLabel(tr("Filter: "), txtFilter); |
88 QLabel * lblFilter = new QLabel(tr("Filter: "), txtFilter); |
88 lblFilter->setStyleSheet(QString("background: none; margin-left: -%1px; margin-top: 4px;").arg(lblFilter->width() / 2 - 3)); |
89 QFontMetrics lblMetrics(lblFilter->font()); |
89 txtFilter->setStyleSheet(QString("border-width: 0px; background-color: rgb(13, 5, 68); border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: %1px; padding-bottom: 2px;").arg(lblFilter->width() / 2)); |
90 int lblFilterWidth = lblMetrics.width(lblFilter->text()); |
|
91 lblFilter->setStyleSheet(QString("background: none; margin-left: -%1px; margin-top: 4px;").arg(lblFilterWidth + 5)); |
|
92 txtFilter->setStyleSheet(QString("LineEditCursor, QLabel { border-width: 0px; border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: %1px; padding-bottom: 2px; background-color: rgb(23, 11, 54); } LineEditCursor:hover, LineEditCursor:focus { background-color: rgb(13, 5, 68); }").arg(lblFilterWidth + 5)); |
90 |
93 |
91 // Corner widget |
94 // Corner widget |
92 QLabel * corner = new QLabel(); |
95 QLabel * corner = new QLabel(); |
93 corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png"))); |
96 corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png"))); |
94 corner->setFixedSize(10, 10); |
97 corner->setFixedSize(10, 10); |