8000 [Bug] 窗口最大化后通过拖动控制栏使其窗口化时UI错乱 · Issue #725 · Pixeval/Pixeval · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug] 窗口最大化后通过拖动控制栏使其窗口化时UI错乱 #725

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

Open
Sycxp opened this issue Apr 15, 2025 · 4 comments
Open
Labels
bug 🐛 Something isn't working

Comments

@Sycxp
Copy link
Sycxp commented Apr 15, 2025

Pixeval的版本 / Pixeval's version

WinUI 3

问题描述 / Description of the problem

如题,在窗口最大化后,通过拖动控制栏使其窗口化时,UI会错乱,有一部分控件消失不见。

屏幕截图 / Screenshot

额,不多说。

错误代码 / Error code

没有。

Windows主要版本 / Windows major version

Windows 11

其他信息 / Additional Information

最近我好像捉虫比较多,大大会原谅我的(

@Sycxp Sycxp added the bug 🐛 Something isn't working label Apr 15, 2025
@Poker-sang
Copy link
Collaborator

感觉是winui标题栏的bug,但又不知道咋修

@Sycxp
Copy link
Author
Sycxp commented Apr 16, 2025

感觉是winui标题栏的bug,但又不知道咋修

我只会Python的UI,但是一般这种情况,我都是获得窗口Handler后开一个次线程监测控件渲染的,毕竟Python的UI库有些太简陋了(
另外,开发者有考虑接入其他语言吗(我知道很麻烦啦)我想写一点拓展但是C#不会……

@Poker-sang
Copy link
Collaborator
Poker-sang commented Apr 16, 2025 via email

@Sycxp
Copy link
Author
Sycxp commented Apr 17, 2025

谢谢!实际上Pixeval扩展是支持别的语言的(只要是COM的dll就可以),但说实话这个技术太麻烦了连我都不知道除了C++和C#,怎么用其他语言写COM扩展】

你想做什么样的扩展呢

举个例子,分析常看的tag(主要用于整蛊,所以做成拓展),大概写了一段Python,没有实现,只有定义:

from Pixeval import * #这里需要写一个支持库Pixeval
history = get_history(30) #这里的get_history函数应该传入一个id: int或date: tuple
introduction = get_page("image", "introduce") #这里获取推荐页面的第一部分,即未加载后面的部分
res_img = analysis(history + introduction) #需要实现的分析函数
display.create.p("你常看的tag是:").pack() #控件API,这里是HTML的p控件
display.create.img(res_img).pack() #控件api,这里是img图像

大体举了个例子,没有实现。但是总结起来,大概所需的API有:

  • get_page(type: str, page: str)
  • get_history(id: int, date: tuple)
  • display库,用于UI绘制(估计简单的就行)
    • create类,用于创建控件
      • p(text: str)
      • img(img: pillow.Image, text: str)
  • 对于每个控件,应该有pack方法用于绘制

我暂时不知道目前的拓展是怎么实现的,但是倘若是直接调用内部函数,有安全风险。除此之外,如果有一套有基本功能的API就好了,可以解决这个问题。

偶对了,这些很麻烦啦,不想做就别做了,我就说说(做了我就写),另外如果真的要做,Python方面的对接我可以来试试。

另注:由于我暂时不知道拓展的原理,我先不提交这个安全问题的issue,目前没这个风险。一会儿我把这个东西发一个feature的issue

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

2 participants
0