improv: add window border
This commit is contained in:
parent
36b3cfa13a
commit
127ce17b85
26 changed files with 130 additions and 114 deletions
|
|
@ -5,14 +5,13 @@ use iced::widget::Container;
|
|||
use iced::Vector;
|
||||
pub use subscription::*;
|
||||
|
||||
use iced_core::alignment;
|
||||
use iced_core::event::{self, Event};
|
||||
use iced_core::layout;
|
||||
use iced_core::mouse;
|
||||
use iced_core::overlay;
|
||||
use iced_core::renderer;
|
||||
use iced_core::widget::Tree;
|
||||
use iced_core::{Clipboard, Element, Layout, Length, Padding, Rectangle, Shell, Widget};
|
||||
use iced_core::{Alignment, Clipboard, Element, Layout, Length, Padding, Rectangle, Shell, Widget};
|
||||
use std::{fmt::Debug, hash::Hash};
|
||||
|
||||
pub use iced_widget::container::{Catalog, Style};
|
||||
|
|
@ -133,14 +132,14 @@ where
|
|||
|
||||
/// Sets the content alignment for the horizontal axis of the [`Container`].
|
||||
#[must_use]
|
||||
pub fn align_x(mut self, alignment: alignment::Horizontal) -> Self {
|
||||
pub fn align_x(mut self, alignment: Alignment) -> Self {
|
||||
self.container = self.container.align_x(alignment);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the content alignment for the vertical axis of the [`Container`].
|
||||
#[must_use]
|
||||
pub fn align_y(mut self, alignment: alignment::Vertical) -> Self {
|
||||
pub fn align_y(mut self, alignment: Alignment) -> Self {
|
||||
self.container = self.container.align_y(alignment);
|
||||
self
|
||||
}
|
||||
|
|
@ -159,6 +158,13 @@ where
|
|||
self
|
||||
}
|
||||
|
||||
/// Centers the contents in the horizontal and vertical axis of the [`Container`].
|
||||
#[must_use]
|
||||
pub fn center(mut self, length: Length) -> Self {
|
||||
self.container = self.container.center(length);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the style of the [`Container`].
|
||||
#[must_use]
|
||||
pub fn style(mut self, style: impl Into<<crate::Theme as Catalog>::Class<'a>>) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue