leminlimez / Helium

GNU General Public License v3.0
415 stars 19 forks source link

Adaptive foreground color #30

Closed Lessica closed 5 months ago

Lessica commented 6 months ago

Hello everyone, I'm the author of TrollSpeed.

I opened an issue here to share my progress on adaptive foregound color without the injection into SpringBoard.

I looked into FrontBoardServices, but failed to find a way to get the foreground color of the status bar...
Now I made another attempt: using CABackdropLayer and CAFilter to achieve this.

(Not very perfect, use with caution.) See: https://github.com/Lessica/TrollSpeed/commit/7e798f089ecee8a4aa243e7775c16d98b6319b10

leminlimez commented 6 months ago

Thanks for sharing! I was looking to see if it would be a notification posted by the springboard that could be monitored.

I also tried adding your changes to keep the hud running in the background longer, but it ended up causing more issues (ie. not coming back after disappearing on the lock screen)

gsons commented 6 months ago

Hello everyone, I'm the author of TrollSpeed.

I opened an issue here to share my progress on adaptive foregound color without the injection into SpringBoard.

I looked into FrontBoardServices, but failed to find a way to get the foreground color of the status bar... Now I made another attempt: using CABackdropLayer and CAFilter to achieve this.

(Not very perfect, use with caution.) See: Lessica/TrollSpeed@7e798f0

Great, in which version will you update this feature?

Lessica commented 6 months ago

Thanks for sharing! I was looking to see if it would be a notification posted by the springboard that could be monitored.

Hi, @leminlimez:

I did not find any status bar style changed notification posted by SpringBoard.

Here are some more findings:

  1. "user interface style is light" != "status bar tint color is white"
  2. "app preferred status bar style" != "global status bar style"
  3. Status bar is held by SpringBoard, not app (Any attempt to get status bar color inside app process is useless).
  4. Status bar style combination is related to window scene management (FrontBoard).

I worked on this feature for several days but no luck. CABackdropLayer is my last choice.

I also tried adding your changes to keep the hud running in the background longer, but it ended up causing more issues (ie. not coming back after disappearing on the lock screen)

  1. Root privilege is still required to avoid being killed on iOS 16 or above (I once removed that root privilege but proved to be wrong).
  2. memorystatus_control makes the situation even worse. I removed calls to this API in my latest commits.
  3. Keys UIApplicationShowsViewsWhileLocked/UIApplicationSystemWindowsSecureKey make some scene on iOS 15.

See: https://github.com/Lessica/TrollSpeed/issues/11

Lessica commented 6 months ago

Hello everyone, I'm the author of TrollSpeed. I opened an issue here to share my progress on adaptive foregound color without the injection into SpringBoard. I looked into FrontBoardServices, but failed to find a way to get the foreground color of the status bar... Now I made another attempt: using CABackdropLayer and CAFilter to achieve this. (Not very perfect, use with caution.) See: Lessica/TrollSpeed@7e798f0

Great, in which version will you update this feature?

TrollSpeed will never add features other than "network speed monitor" and "HUD floating window". I think this feature is better for Helium.

leminlimez commented 5 months ago

completed in v2.2