Skip to content

Commit

Permalink
Make sure everything will be visible in the scrollable
Browse files Browse the repository at this point in the history
It was cutting the bottom part of the tabs.
  • Loading branch information
brianch committed Feb 12, 2024
1 parent 0329f8b commit 0d1e988
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/puzzles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl Tab for PuzzleTab {
],
Button::new(Text::new(lang::tr(&self.lang, "screenshot"))).on_press(PuzzleMessage::TakeScreenshot),
Button::new(Text::new(lang::tr(&self.lang, "export_pdf_btn"))).on_press(PuzzleMessage::ExportToPDF),
].spacing(10).align_items(Alignment::Center))
].padding([0, 0, 30, 0]).spacing(10).align_items(Alignment::Center))
} else {
Scrollable::new(col![
Text::new(lang::tr(&self.lang, "no_puzzle"))
Expand Down
5 changes: 2 additions & 3 deletions src/search_tab.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use iced::widget::svg::Handle;
use iced::widget::{Container, Button, column as col, Text, Radio, row, Row, Svg, PickList, Slider, Scrollable, Space};
use iced::widget::{Container, Button, column as col, Text, Radio, row, Row, Svg, PickList, Slider, Scrollable};
use iced::widget::text::LineHeight;
use iced::{alignment, Command, Element, Alignment, Length};
use std::io::BufReader;
Expand Down Expand Up @@ -451,7 +451,7 @@ impl Tab for SearchTab {
Some(self.variation.clone()),
SearchMesssage::SelectVariation
)
].spacing(10).align_items(Alignment::Center);
].padding([0, 0, 30, 0]).spacing(10).align_items(Alignment::Center);

if self.opening.item != Openings::Any {
let row_color = row![
Expand Down Expand Up @@ -520,7 +520,6 @@ impl Tab for SearchTab {
}
}

search_col = search_col.push(Space::new(Length::Fill, 10));
if self.show_searching_msg {
search_col = search_col.push(Text::new(lang::tr(&self.lang, "searching")));
}
Expand Down
2 changes: 1 addition & 1 deletion src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl Tab for SettingsTab {
].spacing(10).align_items(Alignment::Center);
let content: Element<SettingsMessage, Theme, iced::Renderer> = Container::new(
Scrollable::new(
Column::new().spacing(10).push(col_settings)
Column::new().padding([0, 0, 30, 0]).spacing(10).push(col_settings)
)
).align_x(alignment::Horizontal::Center).height(Length::Fill).width(Length::Fill).into();

Expand Down

0 comments on commit 0d1e988

Please sign in to comment.