Skip to content

Commit

Permalink
rename "configure" to "ripping". tweak scrollbar style
Browse files Browse the repository at this point in the history
  • Loading branch information
B0ney committed Nov 11, 2023
1 parent 5b6632c commit 49d4281
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ impl Application for XMODITS {

fn view(&self) -> Element<Message> {
let top_left_menu = row![
button("Configure").on_press(Message::ConfigPressed),
button("Ripping").on_press(Message::ConfigPressed),
button("Filters").on_press(Message::FilterPressed),
// button("History").on_press(Message::HistoryPressed),
button("Settings").on_press(Message::SettingsPressed),
Expand Down
10 changes: 5 additions & 5 deletions src/icon.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use iced::alignment;
use iced::widget::{image, text};
use iced::widget::{image, text, Image};

use crate::font;
use crate::widget::Text;
Expand Down Expand Up @@ -67,12 +67,12 @@ fn icon(unicode: char) -> Text<'static> {
.horizontal_alignment(alignment::Horizontal::Center)
}

pub fn xmodits_logo() -> image::Handle {
get_img("xmodits")
pub fn xmodits_logo() -> Image<image::Handle> {
image(get_img("xmodits"))
}

pub fn vbee3() -> image::Handle {
get_img("vbee3")
pub fn vbee3() -> Image<image::Handle> {
image(get_img("vbee3"))
}

fn get_img(src: &str) -> image::Handle {
Expand Down
6 changes: 3 additions & 3 deletions src/screen/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ use super::build_info;

pub fn view<'a>() -> Element<'a, Message> {
let title = row![
image(vbee3()),
vbee3(),
centered_text("XMODITS - by B0ney"),
image(vbee3()),
vbee3(),
]
.align_items(iced::Alignment::Center)
.spacing(8);
Expand All @@ -24,7 +24,7 @@ pub fn view<'a>() -> Element<'a, Message> {
.on_press(Message::Open(String::from(env!("CARGO_PKG_REPOSITORY"))))
.style(theme::Button::HyperlinkInverted);
let version = centered_text(format!("version: {}", env!("CARGO_PKG_VERSION")));
let image = image(xmodits_logo());
let image = xmodits_logo();
let about = centered_container(centered_column_x(column![
title, version, image, about, repo,
]))
Expand Down
9 changes: 7 additions & 2 deletions src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ impl scrollable::StyleSheet for Theme {
border_color: Color::TRANSPARENT,
scroller: scrollable::Scroller {
color: d,
border_radius: BORDER_RADIUS.into(),
border_radius: 3.0.into(),
border_width: BORDER_WIDTH,
border_color: p.border,
},
Expand All @@ -390,10 +390,15 @@ impl scrollable::StyleSheet for Theme {
scrollable::Scrollbar {
scroller: scrollable::Scroller {
color: if is_mouse_over_scrollbar {
p.accent
Color { a: 0.5, ..p.accent }
} else {
self.active(style).scroller.color
},
border_color: if is_mouse_over_scrollbar {
Color { a: 0.75, ..p.accent }
} else {
self.active(style).scroller.border_color
},
..self.active(style).scroller
},
..self.active(style)
Expand Down

0 comments on commit 49d4281

Please sign in to comment.