aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPolesznyák Márk <contact@pml68.dev>2026-01-01 02:56:59 +0100
committerPolesznyák Márk <contact@pml68.dev>2026-01-01 02:56:59 +0100
commit702d23525a0ce1fb611936202b4d43c107fa921d (patch)
treec4377ab2c1c6a6f37299cf67ab4abb7b7f2c85a5
parentchore: point iced deps to 0.15.0-dev (diff)
downloadiced_material-702d23525a0ce1fb611936202b4d43c107fa921d.tar.gz
feat!: remove feature flags that should be set on iced by the user
-rw-r--r--Cargo.toml6
-rw-r--r--README.md4
-rw-r--r--src/button.rs3
-rw-r--r--src/rule.rs5
4 files changed, 7 insertions, 11 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 4fc6197..959be31 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,15 +12,11 @@ keywords = ["gui", "ui", "graphics", "interface", "widgets"]
rust-version = "1.88"
[features]
-default = ["linux-theme-detection"]
-# Enables Linux system theme detection
-linux-theme-detection = ["iced_winit/linux-theme-detection"]
+default = []
# Provides `serde` support.
serde = ["dep:serde"]
# Provides support for animating with `iced_anim`.
animate = ["dep:iced_anim"]
-# Enables pixel snapping for crisp edges by default (can cause jitter!).
-crisp = ["iced_widget/crisp"]
# Provides support for `iced_dialog`.
dialog = ["dep:iced_dialog"]
# Provides support for `iced_selection`.
diff --git a/README.md b/README.md
index 394c881..3729545 100644
--- a/README.md
+++ b/README.md
@@ -14,11 +14,9 @@
## Features
-- `default`: `linux-theme-detection`
-- `linux-theme-detection`: Enables Linux system theme detection.
+- `default`:
- `serde`: Provides [`serde`](https://docs.rs/serde) support.
- `animate`: Provides support for animating with [`iced_anim`](https://github.com/bradysimon/iced_anim/tree/iced/master).
-- `crisp`: Enables pixel snapping for crisp edges by default (can cause jitter!).
- `dialog`: Provides support for [`iced_dialog`](https://git.sr.ht/~pml68/iced_dialog).
- `selection`: Provides support for [`iced_selection`](https://git.sr.ht/~pml68/iced_selection).
- `markdown`: Provides support for the markdown widget.
diff --git a/src/button.rs b/src/button.rs
index 3b2d871..c4009c5 100644
--- a/src/button.rs
+++ b/src/button.rs
@@ -1,4 +1,5 @@
use iced_widget::button::{Catalog, Status, Style, StyleFn};
+use iced_widget::core::renderer::CRISP;
use iced_widget::core::{Background, Border, Color, border};
use crate::Theme;
@@ -32,7 +33,7 @@ pub fn styled(
text_color: foreground,
border: border::rounded(400),
shadow: shadow_from_elevation(elevation(elevation_level), shadow_color),
- snap: cfg!(feature = "crisp"),
+ snap: CRISP,
};
match status {
diff --git a/src/rule.rs b/src/rule.rs
index d1ccdaa..5894f58 100644
--- a/src/rule.rs
+++ b/src/rule.rs
@@ -1,4 +1,5 @@
use iced_widget::core::border::Radius;
+use iced_widget::core::renderer::CRISP;
use iced_widget::rule::{Catalog, FillMode, Style, StyleFn};
use super::Theme;
@@ -20,7 +21,7 @@ pub fn inset(theme: &Theme) -> Style {
color: theme.colors().outline.variant,
fill_mode: FillMode::Padded(8),
radius: Radius::default(),
- snap: cfg!(feature = "crisp"),
+ snap: CRISP,
}
}
pub fn full_width(theme: &Theme) -> Style {
@@ -28,6 +29,6 @@ pub fn full_width(theme: &Theme) -> Style {
color: theme.colors().outline.variant,
fill_mode: FillMode::Full,
radius: Radius::default(),
- snap: cfg!(feature = "crisp"),
+ snap: CRISP,
}
}