harbour-books/app/qml/Books.js
Slava Monich e4cbab0301 [app] Made night mode brightness configurable
Brightness control is implemented by rendering content with transparent
background, providing background as a separate item behind the content
and adjusting opacity of the content item according to the selected
brightness.
2020-09-21 00:53:21 +03:00

5 lines
91 B
JavaScript

.pragma library
function contentOpacity(brightness) {
return 0.5 + brightness * 0.5
}