feat(spin-button): support fraction::Decimal as model input

This commit is contained in:
Michael Aaron Murphy 2023-01-19 19:45:39 +01:00 committed by Michael Murphy
parent ccc9b60955
commit 046dd49438
2 changed files with 2 additions and 1 deletions

View file

@ -28,6 +28,7 @@ tokio = { version = "1.24.2", optional = true }
cosmic-panel-config = {git = "https://github.com/pop-os/cosmic-panel", optional = true } cosmic-panel-config = {git = "https://github.com/pop-os/cosmic-panel", optional = true }
sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", optional = true, rev = "3776d4a" } sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", optional = true, rev = "3776d4a" }
slotmap = "1.0.6" slotmap = "1.0.6"
fraction = "0.13.0"
[dependencies.cosmic-theme] [dependencies.cosmic-theme]
git = "https://github.com/pop-os/cosmic-theme.git" git = "https://github.com/pop-os/cosmic-theme.git"

View file

@ -6,7 +6,7 @@ use fraction::{Bounded, Decimal};
use std::hash::Hash; use std::hash::Hash;
use std::ops::{Add, Sub}; use std::ops::{Add, Sub};
/// A message emitted by the [`SpinButton`] widget. /// A message emitted by the [`SpinButton`](super) widget.
#[derive(Clone, Copy, Debug, Hash)] #[derive(Clone, Copy, Debug, Hash)]
pub enum Message { pub enum Message {
Increment, Increment,