@@ -20,7 +20,6 @@ use embedded_gui::{
2020 widgets:: {
2121 background:: { Background , BackgroundProperties } ,
2222 border:: { Border , BorderProperties } ,
23- button:: Button ,
2423 fill:: { Center , FillParent , HorizontalAndVertical } ,
2524 label:: Label ,
2625 spacing:: Spacing ,
@@ -140,11 +139,11 @@ pub trait ToggleButtonStateStyle<C: PixelColor> {
140139 where
141140 Label < S , T > : LabelStyling < S , Color = C > ,
142141 {
143- if state. has_state ( Button :: STATE_INACTIVE ) {
142+ if state. has_state ( Toggle :: STATE_INACTIVE ) {
144143 Self :: Inactive :: apply_label ( label) ;
145- } else if state. has_state ( Button :: STATE_HOVERED ) {
144+ } else if state. has_state ( Toggle :: STATE_HOVERED ) {
146145 Self :: Hovered :: apply_label ( label) ;
147- } else if state. has_state ( Button :: STATE_PRESSED ) {
146+ } else if state. has_state ( Toggle :: STATE_PRESSED ) {
148147 Self :: Pressed :: apply_label ( label) ;
149148 } else {
150149 Self :: Idle :: apply_label ( label) ;
@@ -156,11 +155,11 @@ pub trait ToggleButtonStateStyle<C: PixelColor> {
156155 T : BorderProperties < Color = C > ,
157156 W : Widget ,
158157 {
159- if state. has_state ( Button :: STATE_INACTIVE ) {
158+ if state. has_state ( Toggle :: STATE_INACTIVE ) {
160159 Self :: Inactive :: apply_border ( border) ;
161- } else if state. has_state ( Button :: STATE_HOVERED ) {
160+ } else if state. has_state ( Toggle :: STATE_HOVERED ) {
162161 Self :: Hovered :: apply_border ( border) ;
163- } else if state. has_state ( Button :: STATE_PRESSED ) {
162+ } else if state. has_state ( Toggle :: STATE_PRESSED ) {
164163 Self :: Pressed :: apply_border ( border) ;
165164 } else {
166165 Self :: Idle :: apply_border ( border) ;
@@ -172,11 +171,11 @@ pub trait ToggleButtonStateStyle<C: PixelColor> {
172171 T : BackgroundProperties < Color = C > ,
173172 W : Widget ,
174173 {
175- if state. has_state ( Button :: STATE_INACTIVE ) {
174+ if state. has_state ( Toggle :: STATE_INACTIVE ) {
176175 Self :: Inactive :: apply_background ( background) ;
177- } else if state. has_state ( Button :: STATE_HOVERED ) {
176+ } else if state. has_state ( Toggle :: STATE_HOVERED ) {
178177 Self :: Hovered :: apply_background ( background) ;
179- } else if state. has_state ( Button :: STATE_PRESSED ) {
178+ } else if state. has_state ( Toggle :: STATE_PRESSED ) {
180179 Self :: Pressed :: apply_background ( background) ;
181180 } else {
182181 Self :: Idle :: apply_background ( background) ;
0 commit comments