Commit Graph

1414 Commits

Author SHA1 Message Date
Alexandre Bury
eca68256ae Use With trait instead of mutable variable 2020-06-16 22:34:54 -07:00
Alexandre Bury
c10b5e9a1e Correctly initializes TextArea
Was in a bad state until the first `layout` phase.
2020-06-16 22:29:45 -07:00
Alexandre Bury
e3a266aa0e Add once1! macro 2020-06-14 22:51:57 -07:00
Alexandre Bury
9060b38e75 Update changelog 2020-06-14 21:14:27 -07:00
Alexandre Bury
8df6b05e1c Add Dialog::into_content 2020-06-13 23:00:13 -07:00
Alexandre Bury
7d833d5386 Fix important_area for ShadowView and PaddedView 2020-06-11 10:22:03 -07:00
Alexandre Bury
72ded36093 More fully qualified paths 2020-06-09 11:12:01 -07:00
Alexandre Bury
aeb9b2af7b Use fully-qualified paths for wrap_impl! macro 2020-06-09 09:17:07 -07:00
Alexandre Bury
a68e237c81 Fix size confusion in LinearLayout::Child 2020-06-08 19:57:55 -07:00
Alexandre Bury
5b3f4e95a4 Remove pancurses from windows build 2020-06-02 16:01:37 -07:00
Alexandre Bury
b50d76a696 Add doc/test.txt file to test unicode rendering 2020-06-02 12:28:28 -07:00
Alexandre Bury
b91c5d8179 Remove scroll feature for docs.rs 2020-05-28 11:54:21 -07:00
Alexandre Bury
13237e38ee Update CI config 2020-05-26 13:22:56 -07:00
Alexandre Bury
d5205769f6 Start development of 0.15.1-alpha.0 2020-05-26 12:11:45 -07:00
Alexandre Bury
5309fac886 Include version in cursive-core dependency 2020-05-26 11:41:01 -07:00
Alexandre Bury
d2bcb70f93 (cargo-release) version 0.15.0 2020-05-26 11:39:19 -07:00
Alexandre Bury
3df1eafe11 Update Readme 2020-05-26 11:39:05 -07:00
Alexandre Bury
060da3197c Update changelog 2020-05-26 11:35:19 -07:00
Alexandre Bury
a9ae211928 Fix clippy lints 2020-05-26 11:31:40 -07:00
Alexandre Bury
d9161f12fc Fix select_test example 2020-05-26 11:26:39 -07:00
Alexandre Bury
0a14106127 Fix doc links accross re-use 2020-05-26 11:01:28 -07:00
Alexandre Bury
f8d34b8c52 Fix EventTrigger::has_tag 2020-05-23 18:51:59 -07:00
Alexandre Bury
ec10145bf2 Add SelectView::(try_)iter_mut 2020-05-09 18:55:51 -07:00
mara
fc5060a8e0
Fix the theme example (#452)
- Remove the inline feature detection, it doesn't work for features of
  dependencies. Instead use `required-features` in `Cargo.toml` for the
  specific binary.

- The asset moved one level up relatively to `../../assets/style.toml`
2020-05-08 11:44:18 -07:00
Alexandre Bury
fc59ee6f17 Forward toml feature 2020-05-08 10:14:15 -07:00
Jonathan Spira
ea3169961d
Updated Dialog convencience methods: test and info to take Into<StyledString> (#449)
* Updated dialog typed to allow for StyledString
2020-04-26 15:00:57 -07:00
Jonathan Spira
2750ac370b
Added impl_enabled to more widgets (#448)
* Expanded on API for Checkbox and for Enabled.

Added a `with_x` variant to both, for easier chaining.

* Added enabled/disable macro support to everything with an enabled/disabled method.

This also gives them `with_enabled`, but more importantly, keeps things tidy
2020-04-25 12:57:31 -07:00
Jonathan Spira
f42fc382e6
Expanded on API for Checkbox and for Enabled. (#447)
Added a `with_x` variant to both, for easier chaining.
2020-04-25 11:13:04 -07:00
Alexandre Bury
57d5b21518 Test markdown feature on appveyor 2020-04-24 17:04:00 -07:00
Alexandre Bury
f9a58e7936 Attempt to fix appveyor build 2020-04-23 19:24:27 -07:00
Alexandre Bury
b7764541e5 Move examples to its own member 2020-04-23 17:17:30 -07:00
Alexandre Bury
4154f99b44 Split non-backend code into cursive-core 2020-04-23 13:46:00 -07:00
Wade Mealing
0a6368d681
Missing ) (#444) 2020-04-20 11:26:40 -07:00
Alexandre Bury
7dd55eb126 Update enumset to 1.0.0 2020-04-15 10:34:10 -07:00
Alexandre Bury
34e8bb1f15 Update crossterm to 0.17 2020-04-05 12:31:51 -07:00
Daniel Xu
750a7af6c7
theme: Add PaletteColor::HighlightText (#438)
You generally want to stick to default colors because of terminal color
schemes. If you don't, you risk getting suboptimal contrast and
difficult-to-read text. When you _do_ want to peg something to a color,
you need to fully specify the foreground and background to ensure you
have enough contrast for text to be readable.

Our project, below
(https://github.com/facebookincubator/resctl/tree/master/resctl/below),
wants to set a less jarring highlight color than red. In order to
effectively do this, we need a way to specify the highlighted text color
without causing a cascade of pegged colors. In other words, if we were
to manually set PaletteColor::View, we would need to manually set
everything PaletteColor::View is `ColorStyle`'d with, and so forth.

I realize this is an API breaking change. I spent some time considering
alternatives (such as detecting whether or not `HighlightText` is set,
and if not, use `View` as the highlighted text color). The problem with
the other options is that you'd need to:

  1) Document the fallback behavior
  2) Maintain backwards compat code paths

Seeing as cursive is pre-1.0 release, I figure this is the best way
forward.
2020-03-31 12:45:01 -07:00
Alexandre Bury
0c1244f580 Use git version of crossterm until next version is released 2020-03-06 08:24:26 -08:00
Alexandre Bury
602bffba15 Bump crossterm to 0.16 2020-03-03 14:24:18 -08:00
Alexandre Bury
4c5e4abe49 Make AnyCb take a &mut dyn View and add Cursive::debug_name 2020-03-03 13:47:31 -08:00
Will Page
5423a9a003
Fix for cursive issue #428, "Rendering an empty SelectView..." (#429)
This change fixes cursive issue #428, caused by indexing into an empty
list.  The issue is corrected by using the .get() method to safely
handle the case where the requested index doesn't exist, and renders
no label in that case.
2020-02-26 08:43:47 -08:00
Daniel Xu
833ad6889e
Fix Event::CtrlChar('z') binding for ncurses backend (#427)
This patch fixes an off by one error where we don't handle ctrl-z
correctly.
2020-02-19 14:26:09 -08:00
Alexandre Bury
a8f31665fc Update pulldown-cmark 2020-02-12 15:34:59 -08:00
Alexandre Bury
a3583ae62e Update ahash crate 2020-02-10 10:35:31 -08:00
Alexandre Bury
4b0b9265ee Crossterm: use button from upstream rather than last_button 2020-02-10 09:53:50 -08:00
Johannes Wünsche
9de4d206bf Add Display & Eq trait for ObservedScreen (#422)
* Add Display&Eq trait for ObservedScreen
2020-01-27 17:53:23 -05:00
Alexandre Bury
5afefb8645 Move ctrl-C handling from backend to cursive callbacks 2020-01-26 14:51:34 -08:00
Alexandre Bury
54882989e4 Add ScreensView 2020-01-26 14:43:24 -08:00
Alexandre Bury
11d4c865c6 Add PaletteColor: FromStr 2020-01-20 15:38:37 -08:00
Alexandre Bury
7d77786317 Add toml and markdown features to rustdoc 2020-01-20 15:38:10 -08:00
Alexandre Bury
209468c478 Update CHANGELOG 2020-01-14 09:58:47 -08:00