Skip to content

Commit

Permalink
Merge branch 'release/24.02.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
myrho committed Mar 6, 2024
2 parents cc98ac3 + ce1c37c commit 16e67be
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [24.02.1] - 2024-02-29

### Added

- Disabled style for switch knob

### Changed

- Keep custom color on tool icon on hovering

## [24.02.0] - 2024-02-29

### Added
Expand Down
5 changes: 5 additions & 0 deletions src/Switch.elm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type alias Config msg units =
, offStyle : List Style
, onStyle : List Style
, knobStyle : List Style
, disabledStyle : List Style
, attributes : List (Attribute msg)
}

Expand All @@ -37,6 +38,9 @@ switch width height unit =
[ backgroundColor <| rgb 255 255 255
, property "box-shadow" "0 0 0.25em rgba(0,0,0,0.3)"
]
, disabledStyle =
[ backgroundColor <| rgb 120 120 120
]
, onStyle = []
, width = width
, height = height
Expand Down Expand Up @@ -123,5 +127,6 @@ toggleCss config =
[ left <| calc (pct 100) minus (config.unit config.height)
]
]
, disabled <| [ after <| config.disabledStyle ]
, checked config.onStyle
]
2 changes: 1 addition & 1 deletion src/Version.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module Version exposing (version)

version : String
version =
"24.01.0"
"24.02.1"
11 changes: 10 additions & 1 deletion src/View/Graph/Tool.elm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ tool : Config -> Tool msg -> Html msg
tool vc t =
button
[ Css.tool vc t.status
++ (t.color |> Maybe.map (toCssColor >> color >> List.singleton) |> Maybe.withDefault [])
++ (t.color
|> Maybe.map toCssColor
|> Maybe.map
(\c ->
[ color c
, Css.hover [ color c ]
]
)
|> Maybe.withDefault []
)
|> css
, Locale.string vc.locale t.title |> title
, onClick (t.msg t.title)
Expand Down

0 comments on commit 16e67be

Please sign in to comment.