MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / createExportTopBar

Method createExportTopBar

Telegram/SourceFiles/mainwidget.cpp:1095–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1093}
1094
1095void MainWidget::createExportTopBar(Export::View::Content &&data) {
1096 _exportTopBar.create(
1097 this,
1098 object_ptr<Export::View::TopBar>(this, std::move(data)),
1099 _controller->adaptive().oneColumnValue());
1100 _exportTopBar->entity()->clicks(
1101 ) | rpl::on_next([=] {
1102 if (_currentExportView) {
1103 _currentExportView->activatePanel();
1104 }
1105 }, _exportTopBar->lifetime());
1106 orderWidgets();
1107 if (_showAnimation) {
1108 _exportTopBar->show(anim::type::instant);
1109 _exportTopBar->setVisible(false);
1110 } else {
1111 _exportTopBar->hide(anim::type::instant);
1112 _exportTopBar->show(anim::type::normal);
1113 _exportTopBarHeight = _contentScrollAddToY = _exportTopBar->contentHeight();
1114 updateControlsGeometry();
1115 }
1116 rpl::merge(
1117 _exportTopBar->heightValue() | rpl::map_to(true),
1118 _exportTopBar->shownValue()
1119 ) | rpl::on_next([=] {
1120 exportTopBarHeightUpdated();
1121 }, _exportTopBar->lifetime());
1122}
1123
1124void MainWidget::destroyExportTopBar() {
1125 if (_exportTopBar) {

Callers

nothing calls this directly

Calls 10

oneColumnValueMethod · 0.80
activatePanelMethod · 0.80
createMethod · 0.45
clicksMethod · 0.45
showMethod · 0.45
setVisibleMethod · 0.45
hideMethod · 0.45
contentHeightMethod · 0.45
heightValueMethod · 0.45
shownValueMethod · 0.45

Tested by

no test coverage detected