-
Notifications
You must be signed in to change notification settings - Fork 72
Fix yad --html white rectangle at startup #327
Copy link
Copy link
Open
Description
When yad --html starts it has an initial white rectangle in the top left corner which is a different color to the startup background.
This is caused by the WebKit browser page initialization.
Proposed fix is to initally set the background to transparent when webview is created and then when loading in the loaded_cb callback set the background back to white.
The following is fix to yad v 14.2
diff src/html.c src/html.c.bgfix
52a53
> static guint bg_set = 0;
135a137,143
> if (ev == WEBKIT_LOAD_COMMITTED && bg_set == 0 )
> {
> GdkRGBA bg = {1.0, 1.0, 1.0, 1.0}; /* Restore background to White */
> webkit_web_view_set_background_color(v, &bg);
> bg_set = 1;
> }
>
557a566,569
>
> GdkRGBA bg = {0, 0, 0, 0}; /* Set bg to Transparent */
> webkit_web_view_set_background_color(view, &bg);
>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels