From cd03d732b1f0df6c020a94135db2db4b690a4937 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 25 Jan 2021 14:54:51 +0530 Subject: handle cursor events and entry --- src/theme.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/theme.rs') diff --git a/src/theme.rs b/src/theme.rs index 1d2cc36..7ee65a1 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -1,6 +1,6 @@ use cursive::theme::Color::*; use cursive::theme::PaletteColor::*; -use cursive::theme::{BorderStyle, Palette, Theme}; +use cursive::theme::{BorderStyle, ColorStyle, Palette, Style, Theme}; pub fn pallete_gen() -> Palette { let mut p = Palette::default(); @@ -24,3 +24,10 @@ pub fn theme_gen() -> Theme { t.palette = pallete_gen(); return t; } + +pub fn cursor_gen() -> Style { + Style::from(ColorStyle::new( + Light(cursive::theme::BaseColor::Blue), + TerminalDefault, + )) +} -- cgit v1.2.3 From c26de6fbfd55cca906b9c184621a9f550cdcc0f1 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 25 Jan 2021 15:21:36 +0530 Subject: attempt to style cursor --- src/theme.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/theme.rs') diff --git a/src/theme.rs b/src/theme.rs index 7ee65a1..e373b72 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -25,9 +25,10 @@ pub fn theme_gen() -> Theme { return t; } -pub fn cursor_gen() -> Style { +pub fn cursor_gen(foreground: Style) -> Style { Style::from(ColorStyle::new( - Light(cursive::theme::BaseColor::Blue), TerminalDefault, + Light(cursive::theme::BaseColor::Blue), )) + .combine(foreground) } -- cgit v1.2.3 From 9cdef4e296c77fb94d99553de05ba1aaa6c81ed8 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 25 Jan 2021 15:45:03 +0530 Subject: fix cursor coloring --- src/theme.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/theme.rs') diff --git a/src/theme.rs b/src/theme.rs index e373b72..7ae9efc 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -1,4 +1,4 @@ -use cursive::theme::Color::*; +use cursive::theme::Color::{self, *}; use cursive::theme::PaletteColor::*; use cursive::theme::{BorderStyle, ColorStyle, Palette, Style, Theme}; @@ -25,10 +25,6 @@ pub fn theme_gen() -> Theme { return t; } -pub fn cursor_gen(foreground: Style) -> Style { - Style::from(ColorStyle::new( - TerminalDefault, - Light(cursive::theme::BaseColor::Blue), - )) - .combine(foreground) +pub fn cursor_bg() -> Color { + Light(cursive::theme::BaseColor::Black) } -- cgit v1.2.3 From 53f7a679a0cf7a510de13d67cf370988f71c0d08 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 6 Feb 2021 19:00:40 +0530 Subject: deprecate view_month_offset in favor of cursor --- src/theme.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/theme.rs') diff --git a/src/theme.rs b/src/theme.rs index 7ae9efc..879584c 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -1,6 +1,6 @@ use cursive::theme::Color::{self, *}; use cursive::theme::PaletteColor::*; -use cursive::theme::{BorderStyle, ColorStyle, Palette, Style, Theme}; +use cursive::theme::{BorderStyle, Palette, Theme}; pub fn pallete_gen() -> Palette { let mut p = Palette::default(); -- cgit v1.2.3