mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 07:21:32 +08:00
Updates stylesheet margins and more...
This commit is contained in:
parent
91e0f62f3e
commit
5a17a88146
@ -17,6 +17,7 @@ ads--SectionWidget, SectionWidget {
|
||||
|
||||
ads--SectionTitleWidget, SectionTitleWidget {
|
||||
background: palette(window);
|
||||
padding: 9px;
|
||||
}
|
||||
|
||||
ads--SectionTitleWidget[activeTab="true"], SectionTitleWidget[activeTab="true"] {
|
||||
|
@ -21,13 +21,12 @@ ads--SectionWidget, SectionWidget {
|
||||
border-color: #ffffff;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ads--SectionTitleWidget, SectionTitleWidget {
|
||||
background: #7c9eb3;
|
||||
border-right: 1px solid #E7F3F8;
|
||||
padding: 6px 6px;
|
||||
}
|
||||
|
||||
ads--SectionTitleWidget[activeTab="true"], SectionTitleWidget[activeTab="true"] {
|
||||
@ -41,7 +40,8 @@ ads--SectionContentWidget, SectionContentWidget {
|
||||
}
|
||||
|
||||
/* Special */
|
||||
/*
|
||||
ads--SectionTitleWidget IconTitleWidget QLabel { color: #000000; }
|
||||
ads--FloatingWidget QPushButton { background: #E7F3F8; }
|
||||
*/
|
||||
|
||||
IconTitleWidget {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
@ -32,6 +32,8 @@ SectionTitleWidget::SectionTitleWidget(SectionContent::RefPtr content, QWidget*
|
||||
_activeTab(false)
|
||||
{
|
||||
QBoxLayout* l = new QBoxLayout(QBoxLayout::LeftToRight);
|
||||
l->setContentsMargins(0, 0, 0, 0);
|
||||
l->setSpacing(0);
|
||||
l->addWidget(content->titleWidget());
|
||||
setLayout(l);
|
||||
}
|
||||
@ -261,7 +263,7 @@ void SectionTitleWidget::mouseMoveEvent(QMouseEvent* ev)
|
||||
int left, top, right, bottom;
|
||||
getContentsMargins(&left, &top, &right, &bottom);
|
||||
QPoint moveToPos = mapToParent(ev->pos()) - _dragStartPos;
|
||||
moveToPos.setY(0 + top);
|
||||
moveToPos.setY(0/* + top*/);
|
||||
move(moveToPos);
|
||||
ev->accept();
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ IconTitleWidget::IconTitleWidget(const QIcon& icon, const QString& title, QWidge
|
||||
// Icon label
|
||||
if (icon.isNull())
|
||||
{
|
||||
QLabel* titleIcon = new QLabel();
|
||||
titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
|
||||
l->addWidget(titleIcon);
|
||||
// QLabel* titleIcon = new QLabel();
|
||||
// titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
|
||||
// l->addWidget(titleIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -30,7 +30,6 @@ IconTitleWidget::IconTitleWidget(const QIcon& icon, const QString& title, QWidge
|
||||
// Title label
|
||||
QLabel* titleText = new QLabel(title);
|
||||
QFont titleFont = titleText->font();
|
||||
titleFont.setBold(true);
|
||||
titleText->setFont(titleFont);
|
||||
l->addWidget(titleText, 1);
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ int main(int argc, char *argv[])
|
||||
Q_INIT_RESOURCE(ads);
|
||||
|
||||
// Load style sheet
|
||||
// QFile f(":/stylesheets/default-windows.css");
|
||||
QFile f(":/stylesheets/vendor-partsolutions.css");
|
||||
QFile f(":/stylesheets/default-windows.css");
|
||||
// QFile f(":/stylesheets/vendor-partsolutions.css");
|
||||
if (f.open(QFile::ReadOnly))
|
||||
{
|
||||
QByteArray ba = f.readAll();
|
||||
|
Loading…
Reference in New Issue
Block a user