Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

歌词窗口鼠标穿透 #793

Open
cosven opened this issue Feb 7, 2024 · 0 comments
Open

歌词窗口鼠标穿透 #793

cosven opened this issue Feb 7, 2024 · 0 comments
Labels
FEP feeluown enhancement proposal help wanted

Comments

@cosven
Copy link
Member

cosven commented Feb 7, 2024

  • 作者:@xxx
  • 创建时间:2024-02-07
  • 最新状态:

简介与背景

很多歌词软件或者音乐播放器的歌词窗口都支持“鼠标穿透”。

目前已有调研/测试结果如下(在这个 commit 下的测试结果)

if IS_MACOS:
# On macOS, Qt.Tooltip widget can't accept focus and it will hide
# when the application window is actiavted. Qt.Tool widget can't
# keep staying on top. Neither of them work well on macOS.
flags = Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint
else:
# TODO: use proper flags on other platforms, see #413 for more details.
# User can customize the flags in the .fuorc or searchbox, like
# app.ui.lyric_windows.setWindowFlags(Qt.xx | Qt.yy)
flags = Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint | Qt.Tool

  1. windows 下(win11),将背景设置为全透明时,透明的地方就可以鼠标穿透了
  2. macos 下,背景全透明也不能穿透;
  3. 额外设置 self.setAttribute(Qt.WidgetAttribute.WA_TransparentForMouseEvents),仍然不能穿透
  4. linux 下,暂无测试结果

方案概述

暂无已知方案

@cosven cosven added help wanted FEP feeluown enhancement proposal labels Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEP feeluown enhancement proposal help wanted
Projects
None yet
Development

No branches or pull requests

1 participant