Update dependencies
This commit is contained in:
parent
a34a6a2ed4
commit
020924b569
4 changed files with 567 additions and 403 deletions
937
Cargo.lock
generated
937
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -10,14 +10,14 @@ log = "0.4"
|
||||||
env_logger = "0.9"
|
env_logger = "0.9"
|
||||||
rayon = "1.5"
|
rayon = "1.5"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
config = "0.11"
|
config = "0.13"
|
||||||
serde = {version = "1.0", features = ["derive"]}
|
serde = {version = "1.0", features = ["derive"]}
|
||||||
|
|
||||||
# ui
|
# ui
|
||||||
winit = {git="https://github.com/rust-windowing/winit"}
|
winit = {git="https://github.com/rust-windowing/winit"}
|
||||||
cairo-rs = {version = "0.14", features = ["xcb"]}
|
cairo-rs = {version = "0.15", features = ["xcb"]}
|
||||||
cairo-sys-rs = {version = "0.14", features = ["xcb"]}
|
cairo-sys-rs = {version = "0.15", features = ["xcb"]}
|
||||||
pangocairo = "0.14"
|
pangocairo = "0.15"
|
||||||
xcb = "0.10"
|
xcb = "0.10"
|
||||||
xcb-util = {version = "0.4", features = ["ewmh", "icccm"]}
|
xcb-util = {version = "0.4", features = ["ewmh", "icccm"]}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ use config::Config;
|
||||||
use config::ConfigError;
|
use config::ConfigError;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::convert::TryInto;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct Color(f64, f64, f64, f64);
|
pub struct Color(f64, f64, f64, f64);
|
||||||
|
@ -97,18 +98,16 @@ pub struct Settings {
|
||||||
|
|
||||||
impl Settings {
|
impl Settings {
|
||||||
pub fn parse() -> Result<Self, ConfigError> {
|
pub fn parse() -> Result<Self, ConfigError> {
|
||||||
let mut config: Config = Config::default();
|
let mut config: Config = Config::builder()
|
||||||
|
.add_source(config::File::with_name("default"))
|
||||||
|
.add_source(
|
||||||
|
config::Environment::with_prefix("roftl")
|
||||||
|
.ignore_empty(true)
|
||||||
|
.separator("_"),
|
||||||
|
)
|
||||||
|
.build()?;
|
||||||
|
|
||||||
config.merge(config::File::with_name("default"))?;
|
config.try_deserialize()
|
||||||
|
|
||||||
config.merge(
|
|
||||||
config::Environment::new()
|
|
||||||
.prefix("roftl")
|
|
||||||
.separator("_")
|
|
||||||
.ignore_empty(true),
|
|
||||||
)?;
|
|
||||||
|
|
||||||
config.try_into()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn primary_matcher(&self) -> Box<dyn super::shared::Matcher> {
|
pub fn primary_matcher(&self) -> Box<dyn super::shared::Matcher> {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use pangocairo::pango::{self, AttrList, Attribute, FontDescription};
|
use pangocairo::pango::{self, AttrInt, AttrList, Attribute, FontDescription};
|
||||||
|
|
||||||
// (r,g,b,a)
|
// (r,g,b,a)
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
|
@ -114,7 +114,7 @@ impl ThemedContextExt for cairo::Context {
|
||||||
let attrlist = AttrList::new();
|
let attrlist = AttrList::new();
|
||||||
for i in indices {
|
for i in indices {
|
||||||
let (start, end) = ((*i as u32), (*i as u32) + 1);
|
let (start, end) = ((*i as u32), (*i as u32) + 1);
|
||||||
let mut attr = Attribute::new_underline(pangocairo::pango::Underline::Single);
|
let mut attr = AttrInt::new_underline(pangocairo::pango::Underline::Single);
|
||||||
attr.set_start_index(start);
|
attr.set_start_index(start);
|
||||||
attr.set_end_index(end);
|
attr.set_end_index(end);
|
||||||
attrlist.insert(attr);
|
attrlist.insert(attr);
|
||||||
|
|
Loading…
Reference in a new issue