Skip to content

Commit

Permalink
docs: document new attributes; changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
w-lfchen authored and elkowar committed Aug 24, 2024
1 parent 98f6f8f commit 115a0a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to eww will be listed here, starting at changes since versio

### Features
- Update rust toolchain to 1.80.1 (By: w-lfchen)
- Add `:fill-svg` and `:preserve-aspect-ratio` properties to images (By: hypernova7, w-lfchen)
- Add `:truncate` property to labels, disabled by default (except in cases where truncation would be enabled in version `0.5.0` and before) (By: Rayzeq).
- Add support for `:hover` css selectors for tray items (By: zeapoz)
- Add `min` and `max` function calls to simplexpr (By: ovalkonia)
Expand Down
2 changes: 2 additions & 0 deletions crates/eww/src/widgets/widget_definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ fn build_gtk_image(bargs: &mut BuilderArgs) -> Result<gtk::Image> {
// @prop path - path to the image file
// @prop image-width - width of the image
// @prop image-height - height of the image
// @prop preserve-aspect-ratio - whether to keep the aspect ratio when resizing an image. Default: true, false doesn't work for all image types
// @prop fill-svg - sets the color of svg images
prop(path: as_string, image_width: as_i32 = -1, image_height: as_i32 = -1, preserve_aspect_ratio: as_bool = true, fill_svg: as_string = "") {
if !path.ends_with(".svg") && !fill_svg.is_empty() {
log::warn!("Fill attribute ignored, file is not an svg image");
Expand Down

0 comments on commit 115a0a9

Please sign in to comment.