Swapped scrollable for cosmic::scrollable

- Renamed scrollbar to scrollable
This commit is contained in:
Eduardo Flores 2022-10-07 12:00:50 -07:00 committed by Michael Murphy
parent 800ccbb52a
commit 9210179731
4 changed files with 8 additions and 10 deletions

View file

@ -22,12 +22,12 @@ use cosmic::{
radio,
row,
slider,
text,
scrollable
text
},
iced_lazy::responsive,
iced_winit::window::drag,
WindowMsg
WindowMsg,
scrollable
};
pub fn main() -> cosmic::iced::Result {
@ -259,13 +259,11 @@ impl Application for Window {
}
widgets.push(
scrollable(row![
scrollable!(row![
horizontal_space(Length::Fill),
if self.debug { content.explain(Color::WHITE) } else { content },
horizontal_space(Length::Fill),
])
.scrollbar_width(8)
.scroller_width(8)
.into()
);

View file

@ -16,5 +16,5 @@ pub use nav::*;
mod toggler;
pub use toggler::*;
mod scrollbar;
pub use scrollbar::*;
mod scrollable;
pub use scrollable::*;

View file

@ -9,7 +9,7 @@ use iced::{
macro_rules! nav_bar {
($($x:expr),+ $(,)?) => (
$crate::iced::widget::Container::new(
$crate::scrollbar!(
$crate::scrollable!(
$crate::iced::widget::row![
$crate::iced::widget::Column::with_children(
vec![$($crate::iced::Element::from($x)),+]

View file

@ -1,5 +1,5 @@
#[macro_export]
macro_rules! scrollbar {
macro_rules! scrollable {
($x:expr) => (
$crate::iced::widget::scrollable($x)
.scrollbar_width(8)