ladybird/Ladybird/Qt/SettingsDialog.h
Timothy Flynn e7d977f58d Ladybird/Qt: Display drown-down settings using QPushButton
The default behavior of QPushButton is much closer to what we want from
a drop-down menu, as shown in the QPushButton::setMenu documentation:
https://doc.qt.io/qt-6/qpushbutton.html#setMenu

This also results in much less of a "squished" look than before.
2023-10-23 12:12:36 -04:00

37 lines
839 B
C++

/*
* Copyright (c) 2022, Filiph Sandström <filiph.sandstrom@filfatstudios.com>
* Copyright (c) 2023, Cameron Youell <cameronyouell@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/OwnPtr.h>
#include <QCheckBox>
#include <QDialog>
#include <QFormLayout>
#include <QLineEdit>
#include <QMainWindow>
#include <QPushButton>
#pragma once
namespace Ladybird {
class SettingsDialog : public QDialog {
Q_OBJECT
public:
explicit SettingsDialog(QMainWindow* window);
private:
void setup_search_engines();
QFormLayout* m_layout;
QMainWindow* m_window { nullptr };
OwnPtr<QLineEdit> m_new_tab_page;
OwnPtr<QCheckBox> m_enable_search;
OwnPtr<QPushButton> m_search_engine_dropdown;
OwnPtr<QCheckBox> m_enable_autocomplete;
OwnPtr<QPushButton> m_autocomplete_engine_dropdown;
};
}