mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix build on macOS.
This commit is contained in:
parent
72704b2426
commit
b38d6667c4
1 changed files with 3 additions and 2 deletions
|
@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "styles/style_window.h"
|
||||
#include "styles/style_media_view.h"
|
||||
#include "platform/platform_main_window.h"
|
||||
#include "window/window_controller.h"
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#include <CoreFoundation/CFURL.h>
|
||||
|
@ -73,7 +74,7 @@ void TitleWidget::mouseDoubleClickEvent(QMouseEvent *e) {
|
|||
}
|
||||
|
||||
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()) {
|
||||
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.
|
||||
int PreviewTitleHeight() {
|
||||
if (auto window = Core::App().activeWindow()) {
|
||||
if (auto height = window->getCustomTitleHeight()) {
|
||||
if (auto height = window->widget()->getCustomTitleHeight()) {
|
||||
return height;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue