linux4sam / egt

Ensemble Graphics Toolkit - Modern C++ GUI Toolkit for AT91/SAMA5 Microprocessors
https://ensemble.graphics
Apache License 2.0
63 stars 25 forks source link

ScrolledView issue #21

Closed OhYoungJin1 closed 2 years ago

OhYoungJin1 commented 2 years ago

Scroller background not transparent in ScrolledView

I found

[view.cpp 102] To prevent this situation, we force the background drawing of the ScrolledView even if fill flags are set to none.

please...

ldesroches commented 2 years ago

Hi,

Sorry I don't get the issue. You have an issue with the horizontal and vertical scrollers? Screenshot from 2022-05-10 15-08-40 Is something wrong with this?

Can you share a picture of what is not behaving as you expect?

Regards, Ludovic

OhYoungJin1 commented 2 years ago

1

I want the gray area to be transparent

ex) auto list = make_shared(ScrolledView::Policy::as_needed, ScrolledView::Policy::as_needed); list->fill_flags(Theme::FillFlag::blend); list->color(Palette::ColorId::bg, Palette::transparent); -----> 22

auto list = make_shared(ScrolledView::Policy::as_needed, ScrolledView::Policy::as_needed); list->fill_flags(Theme::FillFlag::blend); list->color(Palette::ColorId::bg, egt::Color(229, 229, 229)); -----> 33

list->color(Palette::ColorId::bg, Palette::transparent); --> background color is black! list->color(Palette::ColorId::bg, egt::Color(229, 229, 229)); --> background color is gray!

ldesroches commented 2 years ago

The issue is probably related to the widgets inside your ScrolledView

egt::TopWindow window; window.color(egt::Palette::ColorId::bg, egt::Palette::blue); egt::ScrolledView view(window, egt::Rect(0, 0, 200, 200)); egt::Frame frame(egt::Rect(egt::Point(), egt::Size(400, 400))); frame.fill_flags(egt::Theme::FillFlag::blend); frame.color(egt::Palette::ColorId::bg, egt::Palette::transparent); view.add(frame); window.show();

image

OhYoungJin1 commented 2 years ago

The issue is probably related to the widgets inside your ScrolledView ------> Everything was resolved well !!

Thank you!!!