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

[Bug]: 侧边栏打开状态下点击外部部分控件不会关闭 #1005

Open
Usercyk opened this issue Nov 2, 2024 · 3 comments
Open

[Bug]: 侧边栏打开状态下点击外部部分控件不会关闭 #1005

Usercyk opened this issue Nov 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Usercyk
Copy link

Usercyk commented Nov 2, 2024

What happened?

我照着micaEffect的设置卡写了一个类似的,配置边栏的亚克力效果的设置。
在打开边栏的情况下,更改可见性会报错。
但似乎是第一次会这样
image

Operation System

Windows11 23H2

Python Version

3.12.4

PyQt/PySide Version

PySide6

PyQt/PySide-Fluent-Widgets Version

1.7.0

How to Reproduce?

setting_interface.py

self.navigation_acrylic_card = SwitchSettingCard(
            FIF.TRANSPARENT,
            self.tr("Navigation acrylic effect"),
            self.tr("Apply acrylic to the side navigation bar"),
            cfg.navAcrylicEnabled,
            self.personal_group
        )
self.personal_group.addSettingCard(self.navigation_acrylic_card)
self.navigation_acrylic_card.checkedChanged.connect(
            signal_bus.navAcrylicEnableChanged)

main_window.py

signal_bus.navAcrylicEnableChanged.connect(
            self.navigationInterface.setAcrylicEnabled)

config.py

navAcrylicEnabled = ConfigItem("Personalization", "NavAcrylicEnabled", True, BoolValidator())

signal_bus.py

class SignalBus(QObject):
    """
    Signal bus
    """
    micaEnableChanged = Signal(bool)
    navAcrylicEnableChanged = Signal(bool)

其它的和gallery一样

步骤:

  1. 运行程序
  2. 点击设置,跳转到设置界面
  3. 打开边栏
  4. 点击navigation_acrylic_card的按钮切换状态,*从关闭到打开
  5. 报错QPixmap::scaled: Pixmap is a null pixmap,亚克力效果变成透明效果

Minimum code

见上

@Usercyk Usercyk added the bug Something isn't working label Nov 2, 2024
@Usercyk Usercyk changed the title [Bug]: 打开侧边栏时更改其亚克力效果 [Bug]: 打开侧边栏时更改其亚克力效果报错且直接透明 Nov 2, 2024
@Usercyk Usercyk changed the title [Bug]: 打开侧边栏时更改其亚克力效果报错且直接透明 [Bug]: 侧边栏打开状态下点击外部部分控件不会关闭 Nov 9, 2024
@Usercyk
Copy link
Author

Usercyk commented Nov 9, 2024

上面这个bug我手动加了一些判断,让侧边栏先关闭,再重新设置,已修复

@Usercyk
Copy link
Author

Usercyk commented Nov 9, 2024

但我发现了新bug,在打开侧边栏的情况下,点击设置卡的按钮是不会让侧边栏缩回的,所以可以在侧边栏打开的情况下修改主题,这个时候,虽然侧边栏颜色有变化,但明显颜色不对(打开了acrylic effect时),估计是和后面颜色混合的数据没有被更新?我猜的

@Usercyk
Copy link
Author

Usercyk commented Nov 9, 2024

同样地,也可以在打开状态下修改主题色,不过主题色修改似乎可以正常工作,边栏的主题色也会被修改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant