From 1fb8f311311cbd53653512b03643a2d66e7667c7 Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Tue, 26 Nov 2019 22:24:56 +0300 Subject: [PATCH] fix #165 --- profiler_gui/bookmarks_editor.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/profiler_gui/bookmarks_editor.cpp b/profiler_gui/bookmarks_editor.cpp index 9608e07..3ad7c2f 100644 --- a/profiler_gui/bookmarks_editor.cpp +++ b/profiler_gui/bookmarks_editor.cpp @@ -69,6 +69,7 @@ BookmarkEditor::BookmarkEditor(size_t bookmarkIndex, bool isNew, QWidget* parent , m_isNewBookmark(isNew) { setAttribute(Qt::WA_DeleteOnClose, true); + //setWindowFlags(Qt::Dialog); setSizeGripEnabled(EASY_GLOBALS.use_custom_window_header); const auto& bookmark = EASY_GLOBALS.bookmarks[m_bookmarkIndex]; @@ -126,13 +127,16 @@ BookmarkEditor::BookmarkEditor(size_t bookmarkIndex, bool isNew, QWidget* parent contentLayout->addWidget(colorBox); contentLayout->addWidget(m_textEdit, 1); - const WindowHeader::Buttons buttons {WindowHeader::MaximizeButton | WindowHeader::CloseButton}; - auto header = new WindowHeader(isNew ? "New bookmark" : "Edit bookmark", buttons, *this); - auto mainLayout = new QVBoxLayout(this); mainLayout->setContentsMargins(1, 1, 1, 1); mainLayout->setSpacing(0); + +#ifndef __APPLE__ + const WindowHeader::Buttons buttons {WindowHeader::MaximizeButton | WindowHeader::CloseButton}; + auto header = new WindowHeader(isNew ? "New bookmark" : "Edit bookmark", buttons, *this); mainLayout->addWidget(header, 0, Qt::AlignTop); +#endif + mainLayout->addWidget(content, 1); mainLayout->addWidget(buttonBox, 0, Qt::AlignBottom);