diff --git a/CHANGELOG.md b/CHANGELOG.md index c806e85a..a9ea6065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/Switch.elm b/src/Switch.elm index f05eea64..c2e2ce35 100644 --- a/src/Switch.elm +++ b/src/Switch.elm @@ -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) } @@ -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 @@ -123,5 +127,6 @@ toggleCss config = [ left <| calc (pct 100) minus (config.unit config.height) ] ] + , disabled <| [ after <| config.disabledStyle ] , checked config.onStyle ] diff --git a/src/Version.elm b/src/Version.elm index 4328dc79..55a51233 100644 --- a/src/Version.elm +++ b/src/Version.elm @@ -3,4 +3,4 @@ module Version exposing (version) version : String version = - "24.01.0" + "24.02.1" diff --git a/src/View/Graph/Tool.elm b/src/View/Graph/Tool.elm index 07bafd8a..fad7a054 100644 --- a/src/View/Graph/Tool.elm +++ b/src/View/Graph/Tool.elm @@ -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)