-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use iced_core::{Color, Vector}; | ||
use iced_style::button::{Appearance, StyleSheet}; | ||
|
||
// Button is just used as a wrapper to get access to the click event. | ||
// For now all theming option is disabled, we might want to make | ||
// on hovered theming options available in the config later. | ||
pub struct ButtonStyle; | ||
|
||
impl StyleSheet for &ButtonStyle { | ||
type Style = iced::Theme; | ||
|
||
fn active(&self, _: &Self::Style) -> Appearance { | ||
no_style() | ||
} | ||
|
||
fn hovered(&self, _: &Self::Style) -> Appearance { | ||
no_style() | ||
} | ||
|
||
fn pressed(&self, _: &Self::Style) -> Appearance { | ||
no_style() | ||
} | ||
|
||
fn disabled(&self, _: &Self::Style) -> Appearance { | ||
no_style() | ||
} | ||
} | ||
|
||
fn no_style() -> Appearance { | ||
Appearance { | ||
shadow_offset: Vector { x: 0.0, y: 0.0 }, | ||
background: None, | ||
border_radius: 0.0.into(), | ||
border_width: 0.0, | ||
border_color: Color::TRANSPARENT, | ||
text_color: Color::BLACK, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters