slop 2
This commit is contained in:
+14
-8
@@ -12,7 +12,7 @@ use iced::widget::{column, container, mouse_area, text};
|
||||
use iced::{window, Alignment, Element, Length, Rectangle, Task, Theme};
|
||||
use iced_layershell::daemon;
|
||||
use iced_layershell::reexport::{Anchor, PopupAnchor, PopupGravity};
|
||||
use iced_layershell::settings::{LayerShellSettings, StartMode, Settings};
|
||||
use iced_layershell::settings::{LayerShellSettings, Settings, StartMode};
|
||||
use iced_layershell::to_layer_message;
|
||||
|
||||
/// Height of the bar in logical pixels.
|
||||
@@ -208,7 +208,10 @@ fn capture_bounds(module: Module) -> Task<Message> {
|
||||
}
|
||||
|
||||
impl advanced_widget::Operation<Rectangle> for FindBounds {
|
||||
fn traverse(&mut self, operate: &mut dyn FnMut(&mut dyn advanced_widget::Operation<Rectangle>)) {
|
||||
fn traverse(
|
||||
&mut self,
|
||||
operate: &mut dyn FnMut(&mut dyn advanced_widget::Operation<Rectangle>),
|
||||
) {
|
||||
// Delegate traversal so widgets can visit their children; the
|
||||
// container id is matched in `container` above.
|
||||
operate(self);
|
||||
@@ -264,10 +267,14 @@ fn bar_view(_bar: &Bar) -> Element<'static, Message> {
|
||||
}
|
||||
}
|
||||
|
||||
container(column(children).width(Length::Fill).align_x(Alignment::Center))
|
||||
.padding(8)
|
||||
.align_x(Alignment::Center)
|
||||
.into()
|
||||
container(
|
||||
column(children)
|
||||
.width(Length::Fill)
|
||||
.align_x(Alignment::Center),
|
||||
)
|
||||
.padding(8)
|
||||
.align_x(Alignment::Center)
|
||||
.into()
|
||||
}
|
||||
|
||||
/// Standalone button wrapped in MouseArea for click capture. The container
|
||||
@@ -309,8 +316,7 @@ fn popup_view<'a>(bar: &'a Bar) -> Element<'a, Message> {
|
||||
.width(Length::Fill)
|
||||
.align_x(Alignment::Center),
|
||||
column(items).spacing(1),
|
||||
mouse_area(text("close").size(12))
|
||||
.on_press(Message::ClosePopup(popup_id)),
|
||||
mouse_area(text("close").size(12)).on_press(Message::ClosePopup(popup_id)),
|
||||
]
|
||||
.spacing(1)
|
||||
.into()
|
||||
|
||||
Reference in New Issue
Block a user