Updates stylesheet margins and more...

This commit is contained in:
mfreiholz 2016-02-15 15:18:52 +01:00
parent 91e0f62f3e
commit 5a17a88146
5 changed files with 15 additions and 13 deletions

View File

@ -17,6 +17,7 @@ ads--SectionWidget, SectionWidget {
ads--SectionTitleWidget, SectionTitleWidget { ads--SectionTitleWidget, SectionTitleWidget {
background: palette(window); background: palette(window);
padding: 9px;
} }
ads--SectionTitleWidget[activeTab="true"], SectionTitleWidget[activeTab="true"] { ads--SectionTitleWidget[activeTab="true"], SectionTitleWidget[activeTab="true"] {

View File

@ -21,13 +21,12 @@ ads--SectionWidget, SectionWidget {
border-color: #ffffff; border-color: #ffffff;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
margin: 0;
padding: 0;
} }
ads--SectionTitleWidget, SectionTitleWidget { ads--SectionTitleWidget, SectionTitleWidget {
background: #7c9eb3; background: #7c9eb3;
border-right: 1px solid #E7F3F8; border-right: 1px solid #E7F3F8;
padding: 6px 6px;
} }
ads--SectionTitleWidget[activeTab="true"], SectionTitleWidget[activeTab="true"] { ads--SectionTitleWidget[activeTab="true"], SectionTitleWidget[activeTab="true"] {
@ -41,7 +40,8 @@ ads--SectionContentWidget, SectionContentWidget {
} }
/* Special */ /* Special */
/*
ads--SectionTitleWidget IconTitleWidget QLabel { color: #000000; } IconTitleWidget {
ads--FloatingWidget QPushButton { background: #E7F3F8; } padding: 0;
*/ margin: 0;
}

View File

@ -32,6 +32,8 @@ SectionTitleWidget::SectionTitleWidget(SectionContent::RefPtr content, QWidget*
_activeTab(false) _activeTab(false)
{ {
QBoxLayout* l = new QBoxLayout(QBoxLayout::LeftToRight); QBoxLayout* l = new QBoxLayout(QBoxLayout::LeftToRight);
l->setContentsMargins(0, 0, 0, 0);
l->setSpacing(0);
l->addWidget(content->titleWidget()); l->addWidget(content->titleWidget());
setLayout(l); setLayout(l);
} }
@ -261,7 +263,7 @@ void SectionTitleWidget::mouseMoveEvent(QMouseEvent* ev)
int left, top, right, bottom; int left, top, right, bottom;
getContentsMargins(&left, &top, &right, &bottom); getContentsMargins(&left, &top, &right, &bottom);
QPoint moveToPos = mapToParent(ev->pos()) - _dragStartPos; QPoint moveToPos = mapToParent(ev->pos()) - _dragStartPos;
moveToPos.setY(0 + top); moveToPos.setY(0/* + top*/);
move(moveToPos); move(moveToPos);
ev->accept(); ev->accept();
} }

View File

@ -16,9 +16,9 @@ IconTitleWidget::IconTitleWidget(const QIcon& icon, const QString& title, QWidge
// Icon label // Icon label
if (icon.isNull()) if (icon.isNull())
{ {
QLabel* titleIcon = new QLabel(); // QLabel* titleIcon = new QLabel();
titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16)); // titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
l->addWidget(titleIcon); // l->addWidget(titleIcon);
} }
else else
{ {
@ -30,7 +30,6 @@ IconTitleWidget::IconTitleWidget(const QIcon& icon, const QString& title, QWidge
// Title label // Title label
QLabel* titleText = new QLabel(title); QLabel* titleText = new QLabel(title);
QFont titleFont = titleText->font(); QFont titleFont = titleText->font();
titleFont.setBold(true);
titleText->setFont(titleFont); titleText->setFont(titleFont);
l->addWidget(titleText, 1); l->addWidget(titleText, 1);
} }

View File

@ -12,8 +12,8 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(ads); Q_INIT_RESOURCE(ads);
// Load style sheet // Load style sheet
// QFile f(":/stylesheets/default-windows.css"); QFile f(":/stylesheets/default-windows.css");
QFile f(":/stylesheets/vendor-partsolutions.css"); // QFile f(":/stylesheets/vendor-partsolutions.css");
if (f.open(QFile::ReadOnly)) if (f.open(QFile::ReadOnly))
{ {
QByteArray ba = f.readAll(); QByteArray ba = f.readAll();