mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix build on macOS.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user