improv: get window control icons from icon theme

This commit is contained in:
Michael Aaron Murphy 2024-07-22 07:23:17 +02:00
parent 5474232796
commit 1e5828e01c
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
6 changed files with 31 additions and 51 deletions

View file

@ -8,6 +8,7 @@ use iced::advanced::widget::{self, Operation, OperationOutputWrapper};
use iced::advanced::{overlay, renderer};
use iced::advanced::{Clipboard, Shell};
use iced::{event, mouse, Event, Point, Rectangle, Size};
use iced_core::Renderer;
pub(super) struct Overlay<'a, 'b, Message> {
pub(super) content: &'b mut Element<'a, Message>,
@ -80,15 +81,17 @@ where
layout: Layout<'_>,
cursor: mouse::Cursor,
) {
self.content.as_widget().draw(
self.tree,
renderer,
theme,
style,
layout,
cursor,
&layout.bounds(),
);
renderer.with_layer(layout.bounds(), |renderer| {
self.content.as_widget().draw(
self.tree,
renderer,
theme,
style,
layout,
cursor,
&layout.bounds(),
);
})
}
fn operate(