Skip to content

Commit

Permalink
chore: Adjusted theme button alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoCoding committed Aug 28, 2024
1 parent c5be86a commit 192623c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![windows_subsystem = "windows"]

use iced::font::{self, Font};
use iced::widget::{Button, Column, Container, Row, Slider, Text};
use iced::widget::{Button, Column, Container, Row, Slider, Space, Text};
use iced::Color;
use iced::{
alignment::{Horizontal, Vertical},
Expand Down Expand Up @@ -383,9 +383,13 @@ impl Application for RustCraft {
)
.padding(10)
.on_press(Message::ToggleTheme)
.width(Length::Fill)
.style(button_styles::MinecraftButton);

let top_row = Row::new()
.spacing(10)
.push(Space::with_width(Length::Fill)) // This pushes the button to the right
.push(theme_toggle_button);

let start_button_text = if self.active_schedule {
"Stop"
} else {
Expand Down Expand Up @@ -527,11 +531,6 @@ impl Application for RustCraft {
.push(control_buttons)
.push(timer_display);

let top_row = Row::new()
.spacing(10)
// .push(Space::with_width(Length::Fill)) // This pushes the button to the right
.push(theme_toggle_button);

let content = Column::new().push(top_row).push(
Row::new()
.align_items(Alignment::Center)
Expand Down

0 comments on commit 192623c

Please sign in to comment.