Fix build on macOS.
This commit is contained in:
parent
72704b2426
commit
b38d6667c4
|
@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "styles/style_window.h"
|
#include "styles/style_window.h"
|
||||||
#include "styles/style_media_view.h"
|
#include "styles/style_media_view.h"
|
||||||
#include "platform/platform_main_window.h"
|
#include "platform/platform_main_window.h"
|
||||||
|
#include "window/window_controller.h"
|
||||||
|
|
||||||
#include <Cocoa/Cocoa.h>
|
#include <Cocoa/Cocoa.h>
|
||||||
#include <CoreFoundation/CFURL.h>
|
#include <CoreFoundation/CFURL.h>
|
||||||
|
@ -73,7 +74,7 @@ void TitleWidget::mouseDoubleClickEvent(QMouseEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
object_ptr<Window::TitleWidget> CreateTitleWidget(QWidget *parent) {
|
object_ptr<Window::TitleWidget> CreateTitleWidget(QWidget *parent) {
|
||||||
if (auto window = Core::App().activeWindow()) {
|
if (auto window = qobject_cast<Platform::MainWindow*>(parent)) {
|
||||||
if (auto height = window->getCustomTitleHeight()) {
|
if (auto height = window->getCustomTitleHeight()) {
|
||||||
return object_ptr<TitleWidget>(window, height);
|
return object_ptr<TitleWidget>(window, height);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +87,7 @@ object_ptr<Window::TitleWidget> CreateTitleWidget(QWidget *parent) {
|
||||||
// how it will look in real launched macOS app.
|
// how it will look in real launched macOS app.
|
||||||
int PreviewTitleHeight() {
|
int PreviewTitleHeight() {
|
||||||
if (auto window = Core::App().activeWindow()) {
|
if (auto window = Core::App().activeWindow()) {
|
||||||
if (auto height = window->getCustomTitleHeight()) {
|
if (auto height = window->widget()->getCustomTitleHeight()) {
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue