<commit_before>#include "widgets/dialogs/SettingsDialog.hpp"

#include "Application.hpp"
#include "common/Args.hpp"
#include "controllers/commands/CommandController.hpp"
#include "singletons/Resources.hpp"
#include "util/LayoutCreator.hpp"
#include "util/Shortcut.hpp"
#include "widgets/helper/Button.hpp"
#include "widgets/settingspages/AboutPage.hpp"
#include "widgets/settingspages/AccountsPage.hpp"
#include "widgets/settingspages/CommandPage.hpp"
#include "widgets/settingspages/ExternalToolsPage.hpp"
#include "widgets/settingspages/FiltersPage.hpp"
#include "widgets/settingspages/GeneralPage.hpp"
#include "widgets/settingspages/HighlightingPage.hpp"
#include "widgets/settingspages/IgnoresPage.hpp"
#include "widgets/settingspages/KeyboardSettingsPage.hpp"
#include "widgets/settingspages/ModerationPage.hpp"
#include "widgets/settingspages/NotificationPage.hpp"

#include <QDialogButtonBox>
#include <QLineEdit>

namespace chatterino {

SettingsDialog::SettingsDialog(QWidget *parent)
    : BaseWindow(
          {BaseWindow::Flags::DisableCustomScaling, BaseWindow::Flags::Dialog},
          parent)
{
    this->setWindowTitle("Chatterino Settings");
    this->resize(815, 600);
    this->themeChangedEvent();
    this->scaleChangedEvent(this->scale());

    this->initUi();
    this->addTabs();
    this->overrideBackgroundColor_ = QColor("#111111");
    this->scaleChangedEvent(this->scale());  // execute twice to width of item

    createWindowShortcut(this, "CTRL+F", [this] {
        this->ui_.search->setFocus();
        this->ui_.search->selectAll();
    });

    // Disable the ? button in the titlebar until we decide to use it
    this->setWindowFlags(this->windowFlags() &
                         ~Qt::WindowContextHelpButtonHint);
}

void SettingsDialog::initUi()
{
    auto outerBox = LayoutCreator<QWidget>(this->getLayoutContainer())
                        .setLayoutType<QVBoxLayout>()
                        .withoutSpacing();

    // TOP
    auto title = outerBox.emplace<PageHeader>();
    auto edit = LayoutCreator<PageHeader>(title.getElement())
                    .setLayoutType<QHBoxLayout>()<commit_msg>Fixed settings dialog size (#2145)<commit_after>#include "widgets/dialogs/SettingsDialog.hpp"

#include "Application.hpp"
#include "common/Args.hpp"
#include "controllers/commands/CommandController.hpp"
#include "singletons/Resources.hpp"
#include "util/LayoutCreator.hpp"
#include "util/Shortcut.hpp"
#include "widgets/helper/Button.hpp"
#include "widgets/settingspages/AboutPage.hpp"
#include "widgets/settingspages/AccountsPage.hpp"
#include "widgets/settingspages/CommandPage.hpp"
#include "widgets/settingspages/ExternalToolsPage.hpp"
#include "widgets/settingspages/FiltersPage.hpp"
#include "widgets/settingspages/GeneralPage.hpp"
#include "widgets/settingspages/HighlightingPage.hpp"
#include "widgets/settingspages/IgnoresPage.hpp"
#include "widgets/settingspages/KeyboardSettingsPage.hpp"
#include "widgets/settingspages/ModerationPage.hpp"
#include "widgets/settingspages/NotificationPage.hpp"

#include <QDialogButtonBox>
#include <QLineEdit>

namespace chatterino {

SettingsDialog::SettingsDialog(QWidget *parent)
    : BaseWindow(
          {BaseWindow::Flags::DisableCustomScaling, BaseWindow::Flags::Dialog},
          parent)
{
    this->setWindowTitle("Chatterino Settings");
    this->resize(915, 600);
    this->themeChangedEvent();
    this->scaleChangedEvent(this->scale());

    this->initUi();
    this->addTabs();
    this->overrideBackgroundColor_ = QColor("#111111");
    this->scaleChangedEvent(this->scale());  // execute twice to width of item

    createWindowShortcut(this, "CTRL+F", [this] {
        this->ui_.search->setFocus();
        this->ui_.search->selectAll();
    });

    // Disable the ? button in the titlebar until we decide to use it
    this->setWindowFlags(this->windowFlags() &
                         ~Qt::WindowContextHelpButtonHint);
}

void SettingsDialog::initUi()
{
    auto outerBox = LayoutCreator<QWidget>(this->getLayoutContainer())
                        .setLayoutType<QVBoxLayout>()
                        .withoutSpacing();

    // TOP
    auto title = outerBox.emplace<PageHeader>();
    auto edit = LayoutCreator<PageHeader>(title.getElement())
                    .setLayoutType<QHBoxLayout>()
{'fraction_non_alphanumeric': 0.1335035987926631, 'fraction_numerical': 0.00650104481077316, 'mean_word_length': 4.2988929889298895, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4997096', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1221, 'n_words': 205}