dooble icon indicating copy to clipboard operation
dooble copied to clipboard

Change brightness of pages. Makeup for clowns.

Open Ygarr opened this issue 1 year ago • 21 comments

suggest to reduce eyestrain/eyeblinding especially at night, as here for example: wbbrowsfx

Ygarr avatar May 10 '24 10:05 Ygarr

This a solvable through a modern Linux distribution as some include Night Lights and environment adaptability and sometimes darkness forever mode.

So here's what you have.

https://doc.qt.io/qt-6/qtwebengine-features.html

textbrowser avatar May 10 '24 14:05 textbrowser

If you see a mechanism there, we consider. If not, it'll be a non-portable, non-fantastic solution of toying with colors and alphas and maybe transparencies and highlight and lowlight and silly tweaks which will blind.

textbrowser avatar May 10 '24 14:05 textbrowser

Meanwhile there are inexpensive glasses which dim life for you. Or timely pauses in computing activities. Yah.

textbrowser avatar May 10 '24 14:05 textbrowser

inexpensive glasses which dim life :'-(

Ygarr avatar May 10 '24 14:05 Ygarr

non-portable, non-fantastic solution Perhaps it is truly not reasonable to use inside browser logic to implement this feature. ChatGPT said it is better to use javascript (and css) with Qt6 WebEngine unlike in my example (browser on JavaFx..)

Ygarr avatar May 10 '24 14:05 Ygarr

WebEngine does not include a means of accessing a page's scrollbars. One needs JS for scrolling in that world. Chat is glue-less.

textbrowser avatar May 10 '24 14:05 textbrowser

GPT believes JS would solve the problem in WebEngine?

textbrowser avatar May 12 '24 01:05 textbrowser

GPT is wrong with 100% confidence of being correct with itself. Is non-artificially ignorant.

textbrowser avatar May 12 '24 03:05 textbrowser

hello-darkness-my-old-friend

textbrowser avatar May 14 '24 16:05 textbrowser

Happy you are?

textbrowser avatar May 14 '24 16:05 textbrowser

Happy you are? It looks like inverted colors. But. I think i wil be happy in our context anyway. Thank you for your labour

Ygarr avatar May 16 '24 14:05 Ygarr

Is dark mode. And available in right now. See Settings. There may be a means of offsetting colors but I do not know of it and it requires special focus on the person because dimming is a specialized concept. You wish to dim a page and that page or tab and perhaps others.

textbrowser avatar May 16 '24 16:05 textbrowser

The thing you have pictured is like a thin sheet of somewhat-transparent paper over the document. So a background color adjustment would not work. You need a mask on the document having an adjustable opacity. I think it can be done. Create a label or frame or a plain widget and allow you to set its opacity from 0.0 to 1.0. I don't know if it gets strange. I played with opacity in Glitch and is interfering with styles although this widget would be separate of the Web engine so perhaps is possible and nice. But then you ask for dimness on URLs and default dims and dimness on tabs.

textbrowser avatar May 16 '24 16:05 textbrowser

The widget must be set with a z-value greater than the page's z-value and it must resize on resize events and must consider special progress widgets so it must be between those custom widgets and the document. Like a cake. Cake dimming.

textbrowser avatar May 16 '24 16:05 textbrowser

I also think that enought just everywhere in "night mode" mute slightly. And muting is just change white colors to gray.

Of course, there may be different nuances for different people. Not everyone can be satisfied. But this is just my vision for this problem.

Note: In java code there was solution is: " // Apply brightness reduction effect directly in Java code ColorAdjust colorAdjust = new ColorAdjust(); colorAdjust.setBrightness(-0.3); // Adjust brightness level as needed currentWebView.setEffect(colorAdjust);"

In Qt WebEngine may be here: https://stackoverflow.com/questions/28183738/transparent-background-in-qwebenginepage Also if make brightness with JavaScript may be this: https://wiki.qt.io/QtWebEngine/ScriptsAndExtensions

Ygarr avatar May 16 '24 17:05 Ygarr

I know that you can set the background color of a page. QColor includes darker() and lighter(). This is not a good solution. Setting a darker or lighter background isn't guaranteed to succeed because the page can ignore it even after it's been loaded. And the darkness or lightness of a color is applied to the background. The film you see in your picture is applied everywhere. Over elements, over text, over images, over input fields, over buttons, over films, over everything. This implies that there is a slim cake layer obfuscating the beneath layer. Clown makeup.

JS is also not a solution because it's gimmicky.

textbrowser avatar May 16 '24 17:05 textbrowser

I think my mask idea will work but I will not have it super splendid initially. It will be 50% or so opaque with a View option for all pages. Later opacity configurable and then a setting to disable it at the page but not URL. And maybe a shortcut for instant darkness. See you or not.

textbrowser avatar May 20 '24 20:05 textbrowser

Maybe this future release will introduce your request. So in 2024 best not procrastinate.

textbrowser avatar May 20 '24 20:05 textbrowser

OK, not possible with stacked widgets because of complex keyboard and mouse events.

textbrowser avatar May 21 '24 02:05 textbrowser

suggest to reduce eyestrain/eyeblinding especially at night, as here for example: wbbrowsfx

Can you interact with this page beyond scroll?

textbrowser avatar May 24 '24 20:05 textbrowser

suggest to reduce eyestrain/eyeblinding especially at night, as here for example: ![wbbrowsfx](https://private-user- Can you interact with this page beyond scroll? well, seems yes, rather yes

Ygarr avatar May 29 '24 16:05 Ygarr

I think I got it. A somewhat transparent widget placed on the Web page having transparent mouse events. I did this elsewhere. Perhaps.

textbrowser avatar Jul 31 '24 14:07 textbrowser

Done! Percents in names.

textbrowser avatar Jul 31 '24 15:07 textbrowser

50 25

textbrowser avatar Jul 31 '24 15:07 textbrowser

I'll add an option somewhere to enable this. 25% of black is good?

textbrowser avatar Jul 31 '24 15:07 textbrowser

Notice the mouse cursors in the pictures. Transparent for mouse events.

textbrowser avatar Jul 31 '24 15:07 textbrowser

Completed? Maybe.

textbrowser avatar Jul 31 '24 15:07 textbrowser

Now is done. See ya.

textbrowser avatar Jul 31 '24 19:07 textbrowser