1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 03:09:14 -05:00

Only enable resize grips if size policy isn't fixed

This commit is contained in:
Jon Beniston 2022-11-09 16:15:35 +00:00
parent ee8b8ade88
commit 0d5b6ce4c9
2 changed files with 9 additions and 5 deletions

View File

@ -44,22 +44,26 @@ void FramelessWindowResizer::enableChildMouseTracking()
bool FramelessWindowResizer::mouseOnTopBorder(QPoint pos) const bool FramelessWindowResizer::mouseOnTopBorder(QPoint pos) const
{ {
return (pos.y() >= 0) && (pos.y() < m_gripSize); return ((pos.y() >= 0) && (pos.y() < m_gripSize)
&& (m_widget->sizePolicy().verticalPolicy() != QSizePolicy::Fixed));
} }
bool FramelessWindowResizer::mouseOnBottomBorder(QPoint pos) const bool FramelessWindowResizer::mouseOnBottomBorder(QPoint pos) const
{ {
return (pos.y() > m_widget->height() - 1 - m_gripSize) && (pos.y() < m_widget->height()); return ((pos.y() > m_widget->height() - 1 - m_gripSize) && (pos.y() < m_widget->height())
&& (m_widget->sizePolicy().verticalPolicy() != QSizePolicy::Fixed));
} }
bool FramelessWindowResizer::mouseOnLeftBorder(QPoint pos) const bool FramelessWindowResizer::mouseOnLeftBorder(QPoint pos) const
{ {
return (pos.x() >= 0) && (pos.x() < m_gripSize); return ((pos.x() >= 0) && (pos.x() < m_gripSize)
&& (m_widget->sizePolicy().horizontalPolicy() != QSizePolicy::Fixed));
} }
bool FramelessWindowResizer::mouseOnRightBorder(QPoint pos) const bool FramelessWindowResizer::mouseOnRightBorder(QPoint pos) const
{ {
return (pos.x() > m_widget->width() - 1 - m_gripSize) && (pos.x() < m_widget->width()); return ((pos.x() > m_widget->width() - 1 - m_gripSize) && (pos.x() < m_widget->width())
&& (m_widget->sizePolicy().horizontalPolicy() != QSizePolicy::Fixed));
} }
bool FramelessWindowResizer::mouseOnBorder(QPoint pos) const bool FramelessWindowResizer::mouseOnBorder(QPoint pos) const

View File

@ -448,7 +448,7 @@ void Workspace::stackSubWindows()
for (auto window : devices) for (auto window : devices)
{ {
QSize size = window->minimumSizeHint(); QSize size = window->minimumSizeHint();
size.expandedTo(window->minimumSize()); size = size.expandedTo(window->minimumSize());
window->resize(size); window->resize(size);
} }