Skip to content

Commit

Permalink
better color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
wfraser committed Jul 5, 2020
1 parent d84b527 commit db75bba
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,22 @@ pub fn run(browser: Browser) {

ui.add_global_callback(Key::Esc, |ui| ui.quit());

ui.set_theme(
cursive::theme::Theme::default()
.with(|theme| {
use cursive::theme::{
BaseColor::{Black, White, Green},
Color::{Light, Dark},
PaletteColor,
};
theme.palette[PaletteColor::Background] = Dark(Black);
theme.palette[PaletteColor::View] = Dark(Black);
theme.palette[PaletteColor::Shadow] = Light(Black);
theme.palette[PaletteColor::Primary] = Dark(White);
theme.palette[PaletteColor::Highlight] = Dark(Green);
})
);

let mut crates_select = SelectView::new();
for (label, crate_id) in browser.list_crates() {
crates_select.add_item(label, crate_id);
Expand Down

0 comments on commit db75bba

Please sign in to comment.