fix some styling
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -53,4 +53,5 @@ compile_commands.json
|
||||
|
||||
*_qmlcache.qrc
|
||||
|
||||
build/
|
||||
build
|
||||
debug
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# include "EinsatzplanFrame.hpp"
|
||||
|
||||
EinsatzplanFrame::EinsatzplanFrame(QWidget* parent, QString id, bool admin)
|
||||
:QFrame(parent)
|
||||
{
|
||||
:QFrame(parent) {
|
||||
setFrameStyle(QFrame::Box);
|
||||
setObjectName("einsatzplanFrame");
|
||||
setStyleSheet(R"(
|
||||
@@ -97,6 +96,7 @@ EinsatzplanFrame::EinsatzplanFrame(QWidget* parent, QString id, bool admin)
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
background-color: #DCFF78;
|
||||
color: #212121;
|
||||
border-radius: 10px;
|
||||
}
|
||||
#createMember:pressed{
|
||||
@@ -114,6 +114,7 @@ EinsatzplanFrame::EinsatzplanFrame(QWidget* parent, QString id, bool admin)
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
background-color: #DCFF78;
|
||||
color: #212121;
|
||||
border-radius: 10px;
|
||||
}
|
||||
#deleteMember:pressed{
|
||||
@@ -131,6 +132,7 @@ EinsatzplanFrame::EinsatzplanFrame(QWidget* parent, QString id, bool admin)
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
background-color: #DCFF78;
|
||||
color: #212121;
|
||||
border-radius: 10px;
|
||||
}
|
||||
#createVeranstaltung:pressed{
|
||||
@@ -148,6 +150,7 @@ EinsatzplanFrame::EinsatzplanFrame(QWidget* parent, QString id, bool admin)
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
background-color: #DCFF78;
|
||||
color: #212121;
|
||||
border-radius: 10px;
|
||||
}
|
||||
#deleteVeranstaltung:pressed{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# include "PlanGrid.hpp"
|
||||
|
||||
PlanGrid::PlanGrid(QWidget* parent)
|
||||
:QWidget(parent)
|
||||
{
|
||||
:QWidget(parent) {
|
||||
setObjectName("PlanGrid");
|
||||
setStyleSheet(R"(
|
||||
QWidget{
|
||||
@@ -43,7 +42,7 @@ PlanGrid::PlanGrid(QWidget* parent)
|
||||
|
||||
}
|
||||
)");
|
||||
temp->setFixedSize(250,40);
|
||||
temp->setFixedSize(240, 40);
|
||||
planMap->insert(qMakePair(weekdays[i], times[j]), temp);
|
||||
}
|
||||
}
|
||||
@@ -58,13 +57,24 @@ PlanGrid::PlanGrid(QWidget* parent)
|
||||
border-top-left-radius: 10px;
|
||||
}
|
||||
)");
|
||||
temp->setFixedSize(140,80);
|
||||
temp->setFixedSize(130, 80);
|
||||
gridLayout->addWidget(temp, 0, 0);
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
QLabel* temp = new QLabel(weekdays[i]);
|
||||
temp->setFixedSize(250,80);
|
||||
temp->setFixedSize(240, 80);
|
||||
temp->setObjectName("temp");
|
||||
if (i == 4) {
|
||||
temp->setStyleSheet(R"(
|
||||
#temp{
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
border-top-right-radius: 10px;
|
||||
color: #d8d8d8;
|
||||
}
|
||||
)");
|
||||
|
||||
} else {
|
||||
temp->setStyleSheet(R"(
|
||||
#temp{
|
||||
font-size: 24px;
|
||||
@@ -72,13 +82,25 @@ PlanGrid::PlanGrid(QWidget* parent)
|
||||
color: #d8d8d8;
|
||||
}
|
||||
)");
|
||||
gridLayout->addWidget(temp, 0, i+1,Qt::AlignCenter);
|
||||
}
|
||||
temp->setAlignment(Qt::AlignCenter);
|
||||
gridLayout->addWidget(temp, 0, i + 1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
QLabel* temp = new QLabel(times[i]);
|
||||
temp->setFixedSize(140,40);
|
||||
temp->setFixedSize(130, 40);
|
||||
temp->setObjectName("temp");
|
||||
if (i == 9) {
|
||||
temp->setStyleSheet(R"(
|
||||
#temp{
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-bottom-left-radius: 10px;
|
||||
color: #d8d8d8;
|
||||
}
|
||||
)");
|
||||
} else {
|
||||
temp->setStyleSheet(R"(
|
||||
#temp{
|
||||
font-size: 16px;
|
||||
@@ -86,7 +108,9 @@ PlanGrid::PlanGrid(QWidget* parent)
|
||||
color: #d8d8d8;
|
||||
}
|
||||
)");
|
||||
gridLayout->addWidget(temp, i+1, 0, Qt::AlignCenter);
|
||||
}
|
||||
temp->setAlignment(Qt::AlignRight);
|
||||
gridLayout->addWidget(temp, i + 1, 0);
|
||||
}
|
||||
|
||||
gridLayout->setSpacing(0);
|
||||
@@ -97,6 +121,11 @@ void PlanGrid::populateGrid(){
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int j = 0; j < 10; ++j) {
|
||||
gridLayout->addWidget(planMap->value(qMakePair(weekdays[i], times[j])), j + 1, i + 1);
|
||||
if (i == 4 && j == 9) {
|
||||
(planMap->value(qMakePair(weekdays[i], times[j])))->setStyleSheet(R"(
|
||||
border-bottom-right-radius:10px;
|
||||
)");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user