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"
|
||||
rayon = "1.5"
|
||||
anyhow = "1.0"
|
||||
config = "0.11"
|
||||
config = "0.13"
|
||||
serde = {version = "1.0", features = ["derive"]}
|
||||
|
||||
# ui
|
||||
winit = {git="https://github.com/rust-windowing/winit"}
|
||||
cairo-rs = {version = "0.14", features = ["xcb"]}
|
||||
cairo-sys-rs = {version = "0.14", features = ["xcb"]}
|
||||
pangocairo = "0.14"
|
||||
cairo-rs = {version = "0.15", features = ["xcb"]}
|
||||
cairo-sys-rs = {version = "0.15", features = ["xcb"]}
|
||||
pangocairo = "0.15"
|
||||
xcb = "0.10"
|
||||
xcb-util = {version = "0.4", features = ["ewmh", "icccm"]}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ use config::Config;
|
|||
use config::ConfigError;
|
||||
use serde::Deserialize;
|
||||
use std::collections::HashMap;
|
||||
use std::convert::TryInto;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Color(f64, f64, f64, f64);
|
||||
|
@ -97,18 +98,16 @@ pub struct Settings {
|
|||
|
||||
impl Settings {
|
||||
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.merge(
|
||||
config::Environment::new()
|
||||
.prefix("roftl")
|
||||
.separator("_")
|
||||
.ignore_empty(true),
|
||||
)?;
|
||||
|
||||
config.try_into()
|
||||
config.try_deserialize()
|
||||
}
|
||||
|
||||
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)
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -114,7 +114,7 @@ impl ThemedContextExt for cairo::Context {
|
|||
let attrlist = AttrList::new();
|
||||
for i in indices {
|
||||
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_end_index(end);
|
||||
attrlist.insert(attr);
|
||||
|
|
Loading…
Reference in a new issue