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

Add option for a native window frame.

Fixes #2958.
This commit is contained in:
John Preston
2020-07-07 17:54:39 +04:00
parent d1050e6041
commit f10b2194e6
19 changed files with 314 additions and 111 deletions

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "api/api_updates.h"
#include "core/application.h"
#include "core/click_handler_types.h"
#include "platform/platform_window_title.h"
#include "main/main_account.h"
#include "main/main_domain.h"
#include "main/main_session.h"
@@ -239,6 +240,13 @@ void Controller::showSettings() {
_widget.showSettings();
}
int Controller::verticalShadowTop() const {
return (Platform::NativeTitleRequiresShadow()
&& Core::App().settings().nativeWindowFrame())
? st::lineWidth
: 0;
}
void Controller::showToast(const QString &text) {
Ui::Toast::Show(_widget.bodyWidget(), text);
}
@@ -255,9 +263,7 @@ void Controller::showRightColumn(object_ptr<TWidget> widget) {
}
void Controller::sideBarChanged() {
_widget.setMinimumWidth(_widget.computeMinWidth());
_widget.updateControlsGeometry();
_widget.fixOrder();
_widget.recountGeometryConstraints();
}
void Controller::activate() {