2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Implement general settings section.

This commit is contained in:
John Preston
2018-09-07 12:40:25 +03:00
parent 9af70551f3
commit 38f788f545
8 changed files with 470 additions and 43 deletions

View File

@@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/rp_widget.h"
enum LangKey : int;
namespace Ui {
class VerticalLayout;
} // namespace Ui
@@ -23,6 +25,10 @@ class Button;
} // namespace Profile
} // namespace Info
namespace style {
struct InfoProfileButton;
} // namespace style
namespace Settings {
enum class Type {
@@ -54,6 +60,15 @@ object_ptr<Section> CreateSection(
void AddSkip(not_null<Ui::VerticalLayout*> container);
void AddDivider(not_null<Ui::VerticalLayout*> container);
not_null<Button*> AddButton(
not_null<Ui::VerticalLayout*> container,
LangKey text,
const style::InfoProfileButton &st);
not_null<Button*> AddButtonWithLabel(
not_null<Ui::VerticalLayout*> container,
LangKey text,
rpl::producer<QString> label,
const style::InfoProfileButton &st);
using MenuCallback = Fn<QAction*(
const QString &text,