Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions panels/dock/taskmanager/x11preview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
QRect hoverRect = option.rect;

QPen pen;
if (WM_HELPER->hasComposite()) {
if (WM_HELPER->hasComposite() && WM_HELPER->hasBlurWindow()) {
auto pixmap = index.data(WindowPreviewContentRole).value<QPixmap>();
auto size = calSize(pixmap.size());
auto scaledPixmap = pixmap.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
Expand Down Expand Up @@ -332,9 +332,9 @@
m_listView->openPersistentEditor(index);
}

virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override

Check warning on line 335 in panels/dock/taskmanager/x11preview.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

The function 'sizeHint' is never used.
{
if (!WM_HELPER->hasComposite()) {
if (!WM_HELPER->hasComposite() || !WM_HELPER->hasBlurWindow()) {
return QSize(PREVIEW_CONTENT_MAX_WIDTH + PREVIEW_HOVER_BORDER * 2, PREVIEW_TITLE_HEIGHT + PREVIEW_HOVER_BORDER * 2);
}

Expand Down Expand Up @@ -458,7 +458,7 @@
void X11WindowPreviewContainer::updateOrientation()
{

if (m_direction % 2 == 0 && WM_HELPER->hasComposite()) {
if (m_direction % 2 == 0 && WM_HELPER->hasComposite() && WM_HELPER->hasBlurWindow()) {
m_view->setFlow(QListView::LeftToRight);
} else {
m_view->setFlow(QListView::TopToBottom);
Expand Down
Loading