diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 90ee559c..89fed9c1 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -695,9 +695,17 @@ void CaptureWidget::initPanel() m_panel = new UtilityPanel(this); makeChild(m_panel); +#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ + defined(Q_OS_MACX)) + QScreen* currentScreen = QGuiApplication::screenAt(QCursor::pos()); + panelRect.moveTo(mapFromGlobal(panelRect.topLeft())); + m_panel->setFixedWidth(m_colorPicker->width() * 1.5); + m_panel->setFixedHeight(currentScreen->geometry().height()); +#else panelRect.moveTo(mapFromGlobal(panelRect.topLeft())); panelRect.setWidth(m_colorPicker->width() * 1.5); m_panel->setGeometry(panelRect); +#endif SidePanelWidget* sidePanel = new SidePanelWidget(&m_context.screenshot); connect(sidePanel, diff --git a/src/widgets/panel/utilitypanel.cpp b/src/widgets/panel/utilitypanel.cpp index ac392d4c..1068f906 100644 --- a/src/widgets/panel/utilitypanel.cpp +++ b/src/widgets/panel/utilitypanel.cpp @@ -137,14 +137,4 @@ void UtilityPanel::initInternalPanel() m_internalPanel->setStyleSheet( QStringLiteral("QScrollArea {background-color: %1}").arg(bgColor.name())); m_internalPanel->hide(); - - m_hide = new QPushButton(); - m_hide->setText(tr("Hide")); - m_upLayout->addWidget(m_hide); - connect(m_hide, SIGNAL(clicked()), this, SLOT(slotHidePanel())); -} - -void UtilityPanel::slotHidePanel() -{ - hide(); } diff --git a/src/widgets/panel/utilitypanel.h b/src/widgets/panel/utilitypanel.h index 7a340bf9..7486a347 100644 --- a/src/widgets/panel/utilitypanel.h +++ b/src/widgets/panel/utilitypanel.h @@ -38,13 +38,8 @@ public: void hide(); void show(); -signals: - void mouseEnter(); - void mouseLeave(); - public slots: void toggle(); - void slotHidePanel(); private: void initInternalPanel(); @@ -56,5 +51,4 @@ private: QVBoxLayout* m_layout; QPropertyAnimation* m_showAnimation; QPropertyAnimation* m_hideAnimation; - QPushButton* m_hide; };