HMCL icon indicating copy to clipboard operation
HMCL copied to clipboard

支持修改主页背景的不透明度

Open TunYuntuwuQWQ opened this issue 1 year ago • 3 comments

https://github.com/user-attachments/assets/a9ddf252-c469-4da5-af9f-2c4ad90920b0

TunYuntuwuQWQ avatar Jul 30 '24 08:07 TunYuntuwuQWQ

Four comments.

When select a background type and then move the opacity slider to 0, the background may have a residual image.

Entering 0 in the right input box will not appear. It has a chance of happening, but it will not happen every time. This seems to happen when the pulling frequency is relatively high. I am not sure if it is a code implementation issue or a software framework issue, just mentioning it.

Preview Every time I pull the opacity slider, if the range is large, a lot of stuff appears in the log. Is it possible to optimize this, such as saving the configuration after the pull stops?

Translucent types are not affected by the opacity setting below. That being the case, is it possible to hide the opacity setting when selecting a translucency type?

Preview If the content of the right input box is empty, or contains illegal characters, there seems to be no special mechanism to intervene. Is it possible to follow the behavior of other HMCL input boxes and intervene on empty/illegal characters?

Preview

Regarding comments 1, 3, and 4:

I have submitted new content, and these three suggestions should already be completed or resolved.

Regarding comment 2:

The frequent logs occur because of the constant writing to the configuration file. Each time the slider value changes, this value is first written to the configuration file. The image processing and background updates will read the values from the configuration file to make corresponding updates. If you choose 'saving the configuration after the pull stops' the background will not update as the slider moves. Almost all sliders in HMCL are implemented in this way and contain the issue you mentioned. Considering that the impact of this issue is not significant, I have chosen to follow the existing design pattern.

(Using translation software.)

TunYuntuwuQWQ avatar Jul 30 '24 19:07 TunYuntuwuQWQ

Thanks for your reply!

The frequent logs occur because of the constant writing to the configuration file. Each time the slider value changes, this value is first written to the configuration file. The image processing and background updates will read the values from the configuration file to make corresponding updates. If you choose 'saving the configuration after the pull stops' the background will not update as the slider moves. Almost all sliders in HMCL are implemented in this way and contain the issue you mentioned. Considering that the impact of this issue is not significant, I have chosen to follow the existing design pattern.

Oh, now I understand.

3gf8jv4dv avatar Jul 30 '24 19:07 3gf8jv4dv

config 频繁写入这个问题应当在其他 PR 中给 ConfigHandle 加防抖

burningtnt avatar Aug 16 '24 06:08 burningtnt