Follow the desktop accent colour and colour scheme (XDG portal) (#3)
This commit was merged in pull request #3.
This commit is contained in:
1 parent
02b08cb471
commit
1746884744
16 files changed
+947
-12
No files matched your search
@@ -14,12 +14,24 @@ pub const MAX_PERCENT : Double = 150.0
|
||||
|
||||
pub const METER_DECAY : Double = 0.04
|
||||
|
||||
pub const MIN_TEXT_CONTRAST : Double = 4.5
|
||||
|
||||
pub const MIN_UI_CONTRAST : Double = 3.0
|
||||
|
||||
pub const NORM_PERCENT : Double = 100.0
|
||||
|
||||
pub fn accent_css(Rgb, Bool) -> String
|
||||
|
||||
pub fn accent_text_color(Rgb, Bool) -> Rgb
|
||||
|
||||
pub let black : Rgb
|
||||
|
||||
pub fn clamp_percent(Double) -> Double
|
||||
|
||||
pub fn compare_text(String, String) -> Int32
|
||||
|
||||
pub fn contrast_ratio(Rgb, Rgb) -> Double
|
||||
|
||||
pub fn default_button_icons() -> Array[String]
|
||||
|
||||
pub fn device_bus(Node) -> String
|
||||
@@ -54,6 +66,8 @@ pub fn meter_step(Double, Double) -> Double
|
||||
|
||||
pub fn percent_to_linear(Double) -> Double
|
||||
|
||||
pub fn readable_fg(Rgb) -> Rgb
|
||||
|
||||
pub fn rows(State, Tab) -> Array[Row]
|
||||
|
||||
pub fn scale_linked(Array[Double], Double) -> Array[Double]
|
||||
@@ -66,9 +80,30 @@ pub fn symbolic(String) -> String
|
||||
|
||||
pub fn volume_icon(Double, Bool) -> String
|
||||
|
||||
pub let white : Rgb
|
||||
|
||||
pub fn window_bg(Bool) -> Rgb
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) struct AccentColors {
|
||||
bg : Rgb
|
||||
fg : Rgb
|
||||
text : Rgb
|
||||
border : Rgb
|
||||
}
|
||||
pub fn AccentColors::new(Rgb, Bool) -> Self
|
||||
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) enum ColorScheme {
|
||||
NoPreference
|
||||
Dark
|
||||
Light
|
||||
}
|
||||
pub fn ColorScheme::from_portal(Int32) -> Self
|
||||
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) struct DeviceChoice {
|
||||
id : Int32
|
||||
@@ -127,6 +162,18 @@ pub(all) enum NodeKind {
|
||||
}
|
||||
pub fn NodeKind::from_media_class(String) -> Self
|
||||
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) struct Rgb {
|
||||
r : Double
|
||||
g : Double
|
||||
b : Double
|
||||
}
|
||||
pub fn Rgb::from_portal(Double, Double, Double) -> Self?
|
||||
pub fn Rgb::luminance(Self) -> Double
|
||||
pub fn Rgb::mix(Self, Self, Double) -> Self
|
||||
pub fn Rgb::parse_hex(String) -> Self?
|
||||
pub fn Rgb::to_hex(Self) -> String
|
||||
|
||||
#derive(Eq, @debug.Debug)
|
||||
pub(all) struct Row {
|
||||
id : Int32
|
||||
|
||||
Reference in new issue
Block a user