Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Feb 1, 2024
1 parent 63ad529 commit d195ded
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 105 deletions.
4 changes: 2 additions & 2 deletions examples/cosmic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
[dependencies]
apply = "0.3.0"
fraction = "0.14.0"
libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "dbus-config", "wgpu"] }
libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "dbus-config", ] }
once_cell = "1.18"
slotmap = "1.0.6"
env_logger = "0.10"
Expand All @@ -17,5 +17,5 @@ log = "0.4.17"
[dependencies.cosmic-time]
git = "https://github.com/pop-os/cosmic-time"
default-features = false
branch = "update-0.12"
branch = "wip-iced-update"
features = ["libcosmic", "once_cell"]
11 changes: 9 additions & 2 deletions examples/cosmic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ pub fn main() -> cosmic::iced::Result {

env_logger::init_from_env(env);
cosmic::icon_theme::set_default("Pop");
let mut settings = Settings::default();
settings.window.min_size = Some(cosmic::iced::Size::new(600., 300.));
#[allow(clippy::field_reassign_with_default)]
let settings = Settings {
default_font: cosmic::font::FONT,
window: cosmic::iced::window::Settings {
min_size: Some(cosmic::iced::Size::new(600., 300.)),
..cosmic::iced::window::Settings::default()
},
..Settings::default()
};
Window::run(settings)
}
11 changes: 6 additions & 5 deletions examples/cosmic/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ impl Window {
)
.padding([20, 24]),
)
.width(Length::Fill)
.padding(0)
.style(theme::iced::Button::Transparent)
.on_press(Message::from(sub_page.into_page()))
Expand Down Expand Up @@ -565,11 +566,11 @@ impl Application for Window {
};

widgets.push(
scrollable(row![
horizontal_space(Length::Fill),
content.debug(self.debug),
horizontal_space(Length::Fill),
])
scrollable(
container(content.debug(self.debug))
.align_x(iced::alignment::Horizontal::Center),
)
.width(Length::Fill)
.into(),
);
}
Expand Down
3 changes: 2 additions & 1 deletion examples/cosmic/src/window/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{cell::RefCell, rc::Rc};
use apply::Apply;
use cosmic::{
cosmic_theme,
iced::widget::{checkbox, column, progress_bar, radio, slider, text, text_input},
iced::widget::{checkbox, column, progress_bar, radio, slider, text},
iced::{Alignment, Length},
iced_core::id,
theme::ThemeType,
Expand Down Expand Up @@ -488,6 +488,7 @@ impl State {
.into(),
cosmic::widget::text_input("", &self.entry_value)
.label("Test Input")
.helper_text("test helper text")
.on_input(Message::InputChanged)
.size(20)
.id(INPUT_ID.clone())
Expand Down
1 change: 1 addition & 0 deletions examples/cosmic/src/window/desktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ impl State {
.spacing(16)
.into(),
])
.width(Length::Fill)
.into(),
Some(DesktopPage::DesktopOptions) => self.view_desktop_options(window),
Some(DesktopPage::Wallpaper) => self.view_desktop_wallpaper(window),
Expand Down
4 changes: 2 additions & 2 deletions src/widget/segmented_button/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ where
height: bounds.height,
},
border: Border {
radius: appearance.focus.first.border_radius,
radius: theme.cosmic().radius_s().into(),
..Default::default()
},
shadow: Shadow::default(),
Expand Down Expand Up @@ -808,7 +808,7 @@ where
height: bounds.height,
},
border: Border {
radius: appearance.focus.last.border_radius,
radius: theme.cosmic().radius_s().into(),
..Default::default()
},
shadow: Shadow::default(),
Expand Down
Loading

0 comments on commit d195ded

Please sign in to comment.