1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:27:35 +00:00

QuickShow: Fill the window with white if the opened image has alpha.

This commit is contained in:
Andreas Kling 2019-03-24 03:07:00 +01:00
parent 812dc1e9ea
commit 7e54fdce99

View file

@ -58,6 +58,11 @@ int main(int argc, char** argv)
auto* widget = new GWidget; auto* widget = new GWidget;
window->set_main_widget(widget); window->set_main_widget(widget);
if (bitmap->has_alpha_channel()) {
widget->set_background_color(Color::White);
widget->set_fill_with_background_color(true);
}
widget->set_layout(make<GBoxLayout>(Orientation::Vertical)); widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
auto* label = new GLabel(widget); auto* label = new GLabel(widget);