@@ -261,7 +261,7 @@ pub enum Overflow {
261261
262262/// If specified, a checkmark 🗹 / ☐ to be prepended to the button text
263263#[ derive( Default , Clone , Copy , PartialEq , Eq ) ]
264- pub enum Checkmark {
264+ enum Checkmark {
265265 /// No checkmark (or space for it)
266266 #[ default]
267267 Absent ,
@@ -295,14 +295,16 @@ impl ButtonStyle {
295295 pub fn accelerator ( self , char : char ) -> Self {
296296 Self { accelerator : Some ( char) , ..self }
297297 }
298- /// Draw a checkbox prefix: `[🗹 Example Button]`
299- pub fn checkmark ( self , checkmark : Checkmark ) -> Self {
300- Self { checkmark, ..self }
301- }
302298 /// Draw with or without brackets: `[Example Button]` or `Example Button`
303299 pub fn bracketed ( self , bracketed : bool ) -> Self {
304300 Self { bracketed, ..self }
305301 }
302+ /// Draw a checkbox prefix: `[🗹 Example Button]`
303+ ///
304+ /// Note: use `checkbox` or `menubar_menu_checkbox`
305+ fn checkmark ( self , checkmark : Checkmark ) -> Self {
306+ Self { checkmark, ..self }
307+ }
306308}
307309
308310impl Default for ButtonStyle {
@@ -3155,12 +3157,23 @@ impl<'a> Context<'a, '_> {
31553157 accelerator : char ,
31563158 shortcut : InputKey ,
31573159 ) -> bool {
3158- self . menubar_menu_checkbox ( text, accelerator, shortcut, Checkmark :: AlignOnly )
3160+ self . menubar_menu_item ( text, accelerator, shortcut, Checkmark :: AlignOnly )
31593161 }
31603162
31613163 /// Appends a checkbox to the current menu.
31623164 /// Returns true if the checkbox was activated.
31633165 pub fn menubar_menu_checkbox (
3166+ & mut self ,
3167+ text : & str ,
3168+ accelerator : char ,
3169+ shortcut : InputKey ,
3170+ checked : bool ,
3171+ ) -> bool {
3172+ self . menubar_menu_item ( text, accelerator, shortcut, checked. into ( ) )
3173+ }
3174+
3175+ /// Appends a button or checkbox to the current menu,
3176+ fn menubar_menu_item (
31643177 & mut self ,
31653178 text : & str ,
31663179 accelerator : char ,
0 commit comments