Implement theme styling for Canvas
This commit is contained in:
parent
f92afa7950
commit
fc13bb3d65
10 changed files with 94 additions and 45 deletions
|
|
@ -236,7 +236,12 @@ impl Theme {
|
|||
}
|
||||
|
||||
impl<Message> canvas::Program<Message> for Theme {
|
||||
fn draw(&self, bounds: Rectangle, _cursor: Cursor) -> Vec<Geometry> {
|
||||
fn draw(
|
||||
&self,
|
||||
_theme: &iced::Theme,
|
||||
bounds: Rectangle,
|
||||
_cursor: Cursor,
|
||||
) -> Vec<Geometry> {
|
||||
let theme = self.canvas_cache.draw(bounds.size(), |frame| {
|
||||
self.draw(frame);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue