Swapped scrollable for cosmic::scrollable
- Renamed scrollbar to scrollable
This commit is contained in:
parent
a5b950bfa9
commit
2e57d9e2b6
4 changed files with 8 additions and 10 deletions
|
|
@ -22,12 +22,12 @@ use cosmic::{
|
||||||
radio,
|
radio,
|
||||||
row,
|
row,
|
||||||
slider,
|
slider,
|
||||||
text,
|
text
|
||||||
scrollable
|
|
||||||
},
|
},
|
||||||
iced_lazy::responsive,
|
iced_lazy::responsive,
|
||||||
iced_winit::window::drag,
|
iced_winit::window::drag,
|
||||||
WindowMsg
|
WindowMsg,
|
||||||
|
scrollable
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn main() -> cosmic::iced::Result {
|
pub fn main() -> cosmic::iced::Result {
|
||||||
|
|
@ -259,13 +259,11 @@ impl Application for Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
widgets.push(
|
widgets.push(
|
||||||
scrollable(row![
|
scrollable!(row![
|
||||||
horizontal_space(Length::Fill),
|
horizontal_space(Length::Fill),
|
||||||
if self.debug { content.explain(Color::WHITE) } else { content },
|
if self.debug { content.explain(Color::WHITE) } else { content },
|
||||||
horizontal_space(Length::Fill),
|
horizontal_space(Length::Fill),
|
||||||
])
|
])
|
||||||
.scrollbar_width(8)
|
|
||||||
.scroller_width(8)
|
|
||||||
.into()
|
.into()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,5 @@ pub use nav::*;
|
||||||
mod toggler;
|
mod toggler;
|
||||||
pub use toggler::*;
|
pub use toggler::*;
|
||||||
|
|
||||||
mod scrollbar;
|
mod scrollable;
|
||||||
pub use scrollbar::*;
|
pub use scrollable::*;
|
||||||
|
|
@ -9,7 +9,7 @@ use iced::{
|
||||||
macro_rules! nav_bar {
|
macro_rules! nav_bar {
|
||||||
($($x:expr),+ $(,)?) => (
|
($($x:expr),+ $(,)?) => (
|
||||||
$crate::iced::widget::Container::new(
|
$crate::iced::widget::Container::new(
|
||||||
$crate::scrollbar!(
|
$crate::scrollable!(
|
||||||
$crate::iced::widget::row![
|
$crate::iced::widget::row![
|
||||||
$crate::iced::widget::Column::with_children(
|
$crate::iced::widget::Column::with_children(
|
||||||
vec![$($crate::iced::Element::from($x)),+]
|
vec![$($crate::iced::Element::from($x)),+]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! scrollbar {
|
macro_rules! scrollable {
|
||||||
($x:expr) => (
|
($x:expr) => (
|
||||||
$crate::iced::widget::scrollable($x)
|
$crate::iced::widget::scrollable($x)
|
||||||
.scrollbar_width(8)
|
.scrollbar_width(8)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue