mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Let logout screen correctly darken background
This commit is contained in:
parent
a9f449b64b
commit
6b5cd7bf4c
@ -134,11 +134,25 @@ unsigned char* make_darker(unsigned char *p, int X, int Y, int w, int h) {
|
||||
for(int j = 0; j < h; j++) {
|
||||
for(int i = 0; i < w; i++) {
|
||||
// red
|
||||
if(*pdata > step) *pdata -= step; pdata++;
|
||||
if(*pdata > step)
|
||||
*pdata -= step;
|
||||
else
|
||||
*pdata = 0;
|
||||
pdata++;
|
||||
|
||||
// green
|
||||
if(*pdata > step) *pdata -= step; pdata++;
|
||||
if(*pdata > step)
|
||||
*pdata -= step;
|
||||
else
|
||||
*pdata = 0;
|
||||
pdata++;
|
||||
|
||||
// blue
|
||||
if(*pdata > step) *pdata -= step; pdata++;
|
||||
if(*pdata > step)
|
||||
*pdata -= step;
|
||||
else
|
||||
*pdata = 0;
|
||||
pdata++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user