Skip to content

Commit

Permalink
Limit pcmanfm-qt's transparency hack to its main window
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujan committed Dec 12, 2021
1 parent 20467c9 commit 9bdea84
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Kvantum/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ V1.0.0
* Added a workaround for KWin-Wayland's menus and tooltips (they're polished before the platform name is set to "wayland").
* Added an option (to Kvantum Manager) for not blurring inactive windows.
* Removed the workaround fo the fixed Qt5 bug QTBUG-47043 but added another workaround for a similar Qt6 bug.
* Limit the transparency of PCManFM-Qt's view to its main window.

V0.20.2
---------
Expand Down
2 changes: 1 addition & 1 deletion Kvantum/NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Latest version:

4 Dec 2021, V1.0.0
12 Dec 2021, V1.0.0

See "ChangeLog" for changes.
3 changes: 2 additions & 1 deletion Kvantum/style/Kvantum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3308,7 +3308,8 @@ void Style::drawPrimitive(QStyle::PrimitiveElement element,
: QPalette::Active,
QPalette::Base));
}
else break;
else if (qobject_cast<QMainWindow*>(pw->window()))
break;
}
else if (hspec_.transparent_pcmanfm_sidepane && pw->inherits("Fm::SidePane"))
{
Expand Down
3 changes: 2 additions & 1 deletion Kvantum/style/polishing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ void Style::polish(QWidget *widget)
QWidget *gp = getParent(widget,2);
if ((hspec_.transparent_pcmanfm_view
&& widget->autoFillBackground()
&& (gp && gp->inherits("Fm::FolderView") && !gp->inherits("PCManFM::DesktopWindow")))
&& (gp && gp->inherits("Fm::FolderView") && !gp->inherits("PCManFM::DesktopWindow")
&& qobject_cast<QMainWindow*>(gp->window())))
|| (hspec_.transparent_pcmanfm_sidepane
&& ((pw && pw->inherits("Fm::DirTreeView"))
|| (gp && gp->inherits("Fm::SidePane")))))
Expand Down

0 comments on commit 9bdea84

Please sign in to comment.