Generalize Refineable derive macro to derive arbitrary traits on the refinement type
This commit is contained in:
@@ -14,7 +14,7 @@ pub struct SystemColors {
|
||||
}
|
||||
|
||||
#[derive(Refineable, Clone, Debug)]
|
||||
#[refineable(debug)]
|
||||
#[refineable(Debug)]
|
||||
pub struct StatusColors {
|
||||
pub conflict: Hsla,
|
||||
pub created: Hsla,
|
||||
@@ -30,7 +30,7 @@ pub struct StatusColors {
|
||||
}
|
||||
|
||||
#[derive(Refineable, Clone, Debug)]
|
||||
#[refineable(debug, deserialize)]
|
||||
#[refineable(Debug, serde::Deserialize)]
|
||||
pub struct ThemeColors {
|
||||
pub border: Hsla,
|
||||
/// Border color. Used for deemphasized borders, like a visual divider between two sections
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
use crate::{Appearance, ThemeColors, ThemeColorsRefinement};
|
||||
use refineable::Refineable;
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{Appearance, ThemeColors, ThemeColorsRefinement};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UserThemeFamily {
|
||||
pub name: String,
|
||||
@@ -18,7 +17,7 @@ pub struct UserTheme {
|
||||
}
|
||||
|
||||
#[derive(Refineable, Clone)]
|
||||
#[refineable(deserialize)]
|
||||
#[refineable(Deserialize)]
|
||||
pub struct UserThemeStyles {
|
||||
#[refineable]
|
||||
pub colors: ThemeColors,
|
||||
|
||||
Reference in New Issue
Block a user