@@ -131,6 +131,17 @@ pub const DEFAULT_THICK_EDGES: [Glyph; 8] = [
131131 Glyph :: from_char ( '║' , 1 ) ,
132132] ;
133133
134+ pub const DEFAULT_ROUNDED_EDGES : [ Glyph ; 8 ] = [
135+ Glyph :: from_char ( '╭' , 1 ) ,
136+ Glyph :: from_char ( '─' , 1 ) ,
137+ Glyph :: from_char ( '╮' , 1 ) ,
138+ Glyph :: from_char ( '│' , 1 ) ,
139+ Glyph :: from_char ( '╯' , 1 ) ,
140+ Glyph :: from_char ( '─' , 1 ) ,
141+ Glyph :: from_char ( '╰' , 1 ) ,
142+ Glyph :: from_char ( '│' , 1 ) ,
143+ ] ;
144+
134145/// The style of the border.
135146#[ derive( Debug , Clone , PartialEq , Eq , Hash , Default ) ]
136147pub enum BorderStyle {
@@ -152,6 +163,7 @@ pub enum BorderStyle {
152163 /// 7hello3
153164 /// 6555554
154165 /// ```
166+ Rounded ,
155167 Custom ( [ Glyph ; 8 ] ) ,
156168}
157169
@@ -160,6 +172,7 @@ impl BorderStyle {
160172 match self {
161173 BorderStyle :: Thin => DEFAULT_SLIM_EDGES ,
162174 BorderStyle :: Thick => DEFAULT_THICK_EDGES ,
175+ BorderStyle :: Rounded => DEFAULT_ROUNDED_EDGES ,
163176 BorderStyle :: Custom ( edges) => * edges,
164177 }
165178 }
@@ -429,6 +442,7 @@ impl Widget for Border {
429442 match s {
430443 Some ( "thin" ) | None => BorderStyle :: default ( ) ,
431444 Some ( "thick" ) => BorderStyle :: Thick ,
445+ Some ( "rounded" ) => BorderStyle :: Rounded ,
432446 Some ( s) => {
433447 let mut glyphs = Glyphs :: new ( s) ;
434448 while let Some ( g) = glyphs. next ( ctx. glyph_map ) {
0 commit comments