mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat(theme): border style
This commit is contained in:
parent
bfad57d86f
commit
b67bfa71e1
3 changed files with 73 additions and 63 deletions
|
|
@ -122,7 +122,7 @@ pub struct Which {
|
|||
|
||||
#[derive(Deserialize, DeserializeOver2, Serialize)]
|
||||
pub struct Confirm {
|
||||
pub border: Style,
|
||||
pub border: BorderStyle,
|
||||
pub title: Style,
|
||||
pub content: Style,
|
||||
pub list: Style,
|
||||
|
|
@ -134,7 +134,7 @@ pub struct Confirm {
|
|||
|
||||
#[derive(Deserialize, DeserializeOver2, Serialize)]
|
||||
pub struct Spot {
|
||||
pub border: Style,
|
||||
pub border: BorderStyle,
|
||||
pub title: Style,
|
||||
|
||||
pub tbl_col: Style,
|
||||
|
|
@ -154,14 +154,14 @@ pub struct Notify {
|
|||
|
||||
#[derive(Deserialize, DeserializeOver2, Serialize)]
|
||||
pub struct Pick {
|
||||
pub border: Style,
|
||||
pub border: BorderStyle,
|
||||
pub active: Style,
|
||||
pub inactive: Style,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, DeserializeOver2, Serialize)]
|
||||
pub struct Input {
|
||||
pub border: Style,
|
||||
pub border: BorderStyle,
|
||||
pub title: Style,
|
||||
pub value: Style,
|
||||
pub selected: Style,
|
||||
|
|
@ -169,7 +169,7 @@ pub struct Input {
|
|||
|
||||
#[derive(Deserialize, DeserializeOver2, Serialize)]
|
||||
pub struct Cmp {
|
||||
pub border: Style,
|
||||
pub border: BorderStyle,
|
||||
pub active: Style,
|
||||
pub inactive: Style,
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ pub struct Cmp {
|
|||
|
||||
#[derive(Deserialize, DeserializeOver2, Serialize)]
|
||||
pub struct Tasks {
|
||||
pub border: Style,
|
||||
pub border: BorderStyle,
|
||||
pub title: Style,
|
||||
pub hovered: Style,
|
||||
}
|
||||
|
|
|
|||
10
yazi-shared/src/theme/border_style.rs
Normal file
10
yazi-shared/src/theme/border_style.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use super::Style;
|
||||
use ratatui::widgets::BorderType;
|
||||
use serde::{Deserialize, Serialize, Serializer, ser::SerializeMap};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, Deserialize)]
|
||||
pub struct BorderStyle {
|
||||
#[serde(flatten)]
|
||||
pub style: Style,
|
||||
pub r#type: BorderType,
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
yazi_macro::mod_flat!(color icon style);
|
||||
yazi_macro::mod_flat!(color icon style border_style);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue