diff --git a/src/ViewContainer.h b/src/ViewContainer.h --- a/src/ViewContainer.h +++ b/src/ViewContainer.h @@ -101,6 +101,7 @@ /** Changes the active view to the last used view */ void activateLastUsedView(bool reverse); + void setCss(const QString& styleSheet = QString()); void setCssFromFile(const QUrl& url); /** * This enum describes the directions diff --git a/src/ViewContainer.cpp b/src/ViewContainer.cpp --- a/src/ViewContainer.cpp +++ b/src/ViewContainer.cpp @@ -201,10 +201,16 @@ if (KonsoleSettings::tabBarUseUserStyleSheet()) { setCssFromFile(KonsoleSettings::tabBarUserStyleSheetFile()); } else { - setStyleSheet(QString()); + setCss(); } } +void TabbedViewContainer::setCss(const QString& styleSheet) +{ + static const QString defaultCss = QStringLiteral("QTabWidget::tab-bar, QTabWidget::pane { margin: 0; }\n"); + setStyleSheet(defaultCss + styleSheet); +} + void TabbedViewContainer::setCssFromFile(const QUrl &url) { // Let's only deal w/ local files for now @@ -218,7 +224,7 @@ } QTextStream in(&file); - setStyleSheet(in.readAll()); + setCss(in.readAll()); } void TabbedViewContainer::moveActiveView(MoveDirection direction)