<commit_before>#include "includes/SWidgets/STabWidget.hpp"
#include "includes/SWidgets/SWebView.hpp"
#include "includes/SWidgets/SUrlArea.hpp"
#include "includes/SMainWindow.hpp"

STabWidget::STabWidget(SMainWindow * parent) : 
	QTabWidget(parent),
	m_parent(parent)
{
	// Set attributes for the widgets
	setTabsClosable(true);
    setMovable(true);

    QPushButton *plusButton{ new QPushButton(QIcon(SMainWindow::dataPath + "Images/plusTab.png"), "", this) };
    plusButton->setMaximumWidth(24);
    plusButton->setFlat(true);
    setCornerWidget(plusButton);

	// Connections
	connect(this, &STabWidget::currentChanged, this, &STabWidget::tabChanged);
	connect(this, &STabWidget::tabCloseRequested, this, &STabWidget::tabClosed);
    connect(plusButton, &QPushButton::clicked, this, &STabWidget::createDefaultWebTab);
}

STabWidget::~STabWidget()
{
	// Empty
}

void STabWidget::createWebTab(QString title, SWebView * view)
{
	// Widgets in the tab
	QWidget* tabPage{ new QWidget(this) };
	QVBoxLayout* pageLayout{ new QVBoxLayout(tabPage) };
	view->changeParent(tabPage, this);

	pageLayout->setMargin(0);
	pageLayout->addWidget(view);
    tabPage->setFocusPolicy(Qt::StrongFocus);
    tabPage->installEventFilter(this);

	// Connect the web view to all actions
	connect(view, &SWebView::titleChanged, m_parent, &SMainWindow::changeTitle);
	connect(view, &SWebView::urlChanged, m_parent, &SMainWindow::changeUrl);
	connect(view, &SWebView::loadStarted, m_parent->getUrlArea(), &SUrlArea::loadStarted);
	connect(view, &SWebView::loadProgress, m_parent->getUrlArea(), &SUrlArea::loadInProgress);
	connect(view, &SWebView::loadFinished, m_parent->getUrlArea(), &SUrlArea::loadFinished);
	connect(view->page()->profile(), &QWebEngineProfile::downloadRequested, m_parent, &SMainWindow::addDownload);
<commit_msg>UPDATE the border of the tabs<commit_after>#include "includes/SWidgets/STabWidget.hpp"
#include "includes/SWidgets/SWebView.hpp"
#include "includes/SWidgets/SUrlArea.hpp"
#include "includes/SMainWindow.hpp"

STabWidget::STabWidget(SMainWindow * parent) :
	QTabWidget(parent),
	m_parent(parent)
{
	// Set attributes for the widgets
	setTabsClosable(true);
	setMovable(true);

	QPushButton *plusButton{ new QPushButton(QIcon(SMainWindow::dataPath + "Images/plusTab.png"), "", this) };
	plusButton->setMaximumWidth(24);
	plusButton->setFlat(true);
	setCornerWidget(plusButton);

	// Connections
	connect(this, &STabWidget::currentChanged, this, &STabWidget::tabChanged);
	connect(this, &STabWidget::tabCloseRequested, this, &STabWidget::tabClosed);
	connect(plusButton, &QPushButton::clicked, this, &STabWidget::createDefaultWebTab);

	QString css{
		"QTabWidget::pane{"
		"	border-top: none;"
		"}"
		"QTabWidget::tab-bar{"
		"	left: 5px;"
		"}"
		"QTabBar::tab{"
		"	background: #e2e2e2;"
		"	border: 1px solid #B9B9B9;"
		"	border-style:solid; "
		"	border-bottom: none;"
		"	border-top-left-radius: 0;"
		"	border-top-right-radius: 0;"
		"	min-width: 8px;"
		"	padding: 2px 5px 2px 13px;"
		"}"
		"QTabBar::tab:selected, QTabBar::tab:hover{"
		"	background: #FFFFFF"
		"}"
		"QTabBar::tab:selected{"
		"	border: none;"
		"}"
		"QTabBar::close-button {"
		"	image: url(" + SMainWindow::dataPath + "Images/closeTab.png);"
		"	subcontrol-position: right;"
		"}"
	};
	this->setStyleSheet(css);
}

STabWidget::~STabWidget()
{
	// Empty
}

void STabWidget::createWebTab(QString title, SWebView * view)
{
	// Widgets in the tab
	QWidget* tabPage{ new QWidget(this) };
	QVBoxLayout* pageLayout{ new QVBoxLayout(tabPage) };
	view->changeParent(tabPage, this);

	pageLayout->setMargin(0);
	pageLayout->addWidget(view);
    tabPage->setFocusPolicy(Qt::StrongFocus);
    tabPage->installEventFilter(this);

	// Connect the web view to all actions
	connect(view, &SWebView::titleChanged, m_parent, &SMainWindow::changeTitle);
	connect(view, &SWebView::urlChanged, m_parent, &SMainWindow::changeUrl);
	connect(view, &SWebView::loadStarted, m_parent->getUrlArea(), &SUrlArea::loadStarted);
	connect(view, &SWebView::loadProgress, m_parent->getUrlArea(), &SUrlArea::loadInProgress);
	connect(view, &SWebView::loadFinished, m_parent->getUrlArea(), &SUrlArea::loadFinished);
	connect(view->page()->profile(), &QWebEngineProfile::downloadRequested, m_parent, &SMainWindow::addDownload);

{'fraction_non_alphanumeric': 0.1590749824807288, 'fraction_numerical': 0.005138986218173324, 'mean_word_length': 6.785454545454545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1777779', 'n_tokens_mistral': 1584, 'n_tokens_neox': 1530, 'n_words': 243}