mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
e7d977f58d
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.
37 lines
839 B
C++
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;
|
|
};
|
|
|
|
}
|