49 QGridLayout * topLayout = new QGridLayout(); |
48 QGridLayout * topLayout = new QGridLayout(); |
50 topLayout->setSpacing(0); |
49 topLayout->setSpacing(0); |
51 pageLayout->addLayout(topLayout, 0); |
50 pageLayout->addLayout(topLayout, 0); |
52 |
51 |
53 // Help/prompt message at top |
52 // Help/prompt message at top |
54 QLabel * lblDesc = new QLabel(tr("Join a room")); |
53 QLabel * lblDesc = new QLabel(tr("Search for a room:")); |
55 lblDesc->setObjectName("lblDesc"); |
54 lblDesc->setObjectName("lblDesc"); |
56 lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}"); |
55 lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}"); |
57 lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
56 lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
58 lblDesc->setFixedHeight(24); |
57 lblDesc->setFixedHeight(24); |
59 lblDesc->setMinimumWidth(0); |
58 lblDesc->setMinimumWidth(0); |
61 // Search text box |
60 // Search text box |
62 QWidget * searchContainer = new QWidget(); |
61 QWidget * searchContainer = new QWidget(); |
63 searchContainer->setFixedHeight(24); |
62 searchContainer->setFixedHeight(24); |
64 searchContainer->setObjectName("searchContainer"); |
63 searchContainer->setObjectName("searchContainer"); |
65 searchContainer->setStyleSheet("#searchContainer { background: #F6CB1C; border-top-right-radius: 10px; padding: 3px; }"); |
64 searchContainer->setStyleSheet("#searchContainer { background: #F6CB1C; border-top-right-radius: 10px; padding: 3px; }"); |
66 searchContainer->setFixedWidth(250); |
65 searchContainer->setFixedWidth(200); |
67 searchText = new LineEditCursor(searchContainer); |
66 searchText = new LineEditCursor(searchContainer); |
68 searchText->setFixedWidth(250); |
67 searchText->setFixedWidth(200); |
69 searchText->setMaxLength(60); |
68 searchText->setMaxLength(60); |
70 searchText->setFixedHeight(22); |
69 searchText->setFixedHeight(22); |
71 |
70 searchText->setStyleSheet("LineEditCursor { border-width: 0px; border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: 4px; padding-bottom: 2px; background-color: rgb(23, 11, 54); } LineEditCursor:hover, LineEditCursor:focus { background-color: rgb(13, 5, 68); }"); |
72 // Search label |
|
73 QLabel * lblSearch = new QLabel(tr("Search: "), searchText); |
|
74 QFontMetrics lblMetrics(lblSearch->font()); |
|
75 int lblSearchWidth = lblMetrics.width(lblSearch->text()); |
|
76 lblSearch->setStyleSheet(QString("background: none; margin-left: -%1px; margin-top: 4px;").arg(lblSearchWidth + 5)); |
|
77 searchText->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(lblSearchWidth + 5)); |
|
78 |
71 |
79 // Corner widget |
72 // Corner widget |
80 QLabel * corner = new QLabel(); |
73 QLabel * corner = new QLabel(); |
81 corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png"))); |
74 corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png"))); |
82 corner->setFixedSize(10, 10); |
75 corner->setFixedSize(10, 10); |