Skip to content

Commit

Permalink
add mastodon color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
xMAC94x committed Nov 29, 2022
1 parent b4fa4ec commit 713add3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/src/gui/components/server_browser_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ impl ServerBrowserPanelComponent {
{
button.style(YoutubeBrowserButtonStyle)
},
"mastodon" => {
button.style(MastodonBrowserButtonStyle)
},
_ => button.style(ExtraBrowserStyle),
};
extras = extras.push(button);
Expand Down
12 changes: 12 additions & 0 deletions client/src/gui/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub const DARK_WHITE: Color = Color::from_rgb(0.9, 0.9, 0.9);
const BACKGROUND_BLUE: Color = Color::from_rgb(0.14, 0.21, 0.41);
const LIME_GREEN: Color = Color::from_rgb(0.41, 0.64, 0.26);
const DISCORD_BLURPLE: Color = rgb8(88, 101, 242);
const MASTODON_PURPLE: Color = rgb8(99, 100, 255);
const REDDIT_ORANGE: Color = rgb8(255, 69, 0);
const YOUTUBE_RED: Color = rgb8(255, 0, 0);
const CORNFLOWER_BLUE: Color = Color::from_rgb(0.19, 0.4, 0.85);
Expand Down Expand Up @@ -268,6 +269,17 @@ impl button::StyleSheet for DiscordBrowserButtonStyle {
}
}

pub struct MastodonBrowserButtonStyle;
impl button::StyleSheet for MastodonBrowserButtonStyle {
fn active(&self) -> Style {
Style {
background: Some(Background::Color(MASTODON_PURPLE)),
border_radius: 25.0,
..button::Style::default()
}
}
}

pub struct RedditBrowserButtonStyle;
impl button::StyleSheet for RedditBrowserButtonStyle {
fn active(&self) -> Style {
Expand Down

0 comments on commit 713add3

Please sign in to comment.