mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Make the option for native decorations work on macos too (#64)
Co-authored-by: RadRussianRus <radrussianrus@gmail.com> * Fix app name
This commit is contained in:
@@ -298,10 +298,12 @@ void MainWindow::Private::initCustomTitle() {
|
|||||||
// Emulate custom title instead (code below).
|
// Emulate custom title instead (code below).
|
||||||
//
|
//
|
||||||
// Tried to backport a fix, testing.
|
// Tried to backport a fix, testing.
|
||||||
[_nativeWindow setStyleMask:[_nativeWindow styleMask] | NSFullSizeContentViewWindowMask];
|
if (!UseNativeDecorations()) {
|
||||||
auto inner = [_nativeWindow contentLayoutRect];
|
[_nativeWindow setStyleMask:[_nativeWindow styleMask] | NSFullSizeContentViewWindowMask];
|
||||||
auto full = [_nativeView frame];
|
auto inner = [_nativeWindow contentLayoutRect];
|
||||||
_public->_customTitleHeight = qMax(qRound(full.size.height - inner.size.height), 0);
|
auto full = [_nativeView frame];
|
||||||
|
_public->_customTitleHeight = qMax(qRound(full.size.height - inner.size.height), 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Qt still has some bug with layer-backed widgets containing QOpenGLWidgets.
|
// Qt still has some bug with layer-backed widgets containing QOpenGLWidgets.
|
||||||
// See https://github.com/telegramdesktop/tdesktop/issues/4150
|
// See https://github.com/telegramdesktop/tdesktop/issues/4150
|
||||||
@@ -319,9 +321,10 @@ void MainWindow::Private::initCustomTitle() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Disabled for now.
|
if (UseNativeDecorations()) {
|
||||||
//_useNativeTitle = true;
|
_useNativeTitle = true;
|
||||||
//setWindowTitle(qsl("Telegram"));
|
setWindowTitle(qsl("Kotatogram"));
|
||||||
|
}
|
||||||
#endif // !OS_MAC_OLD
|
#endif // !OS_MAC_OLD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user