Commit Graph

498 Commits

Author SHA1 Message Date
Constantin Berhard
36d5aa016a use Iterator::sum() for summing instead of fold 2017-03-06 22:46:16 +01:00
Alexandre Bury
5f5fb4e502 Add comments 2017-03-06 10:38:18 -08:00
Alexandre Bury
30cac851e7 Fix utils::prefix
And add a few tests
2017-03-06 10:34:58 -08:00
Alexandre Bury
b18ca17b73 Merge pull request #114 from hacksaar/master
fix utils::prefix bug: #113
2017-03-06 10:27:47 -08:00
Constantin Berhard
dc7754d38f fix #113 2017-03-06 15:32:03 +01:00
Alexandre Bury
e0b279d9df Fix clippy warnings 2017-03-05 15:18:15 -08:00
Alexandre Bury
6f129ac83d Only include chan dependancy with termion backend.
We may want to use channels for all backend some day, but not today.
2017-03-05 14:45:21 -08:00
Alexandre Bury
7d9cb03ffb More checks against small viewports
Prevents panics when the terminal is resized.
2017-03-05 11:35:20 -08:00
Alexandre Bury
8dc420c3ed Merge pull request #110 from ihalila/pancurses_0.8
Correct colors on pancurses+Windows and use strongly typed attributes
2017-03-05 10:20:39 -08:00
Ilkka Halila
ea053640fe Use new Attributes and ColorPairs
Pancurses now has an Attribute and ColorPair type, making for a more strongly typed way of handling them when compared to using chtypes.
Also window now has an .attrget() function so pan::Concrete does not need to track the current color any longer.
2017-03-05 13:53:50 +02:00
Ilkka Halila
f6f26bf7af Increment pancurses dependency to version 0.8 2017-03-05 13:49:20 +02:00
Alexandre Bury
ce3400ec0c Add gitter badge 2017-02-27 14:29:14 -08:00
Alexandre Bury
34c7462877 fix: protect scroll operations when non-scrollable
Fixes #109
2017-02-26 14:53:50 -08:00
Alexandre Bury
e91021a633 Bump version to 0.4.1 2017-02-08 16:17:18 -08:00
Alexandre Bury
57c1c1ad61 Merge pull request #107 from dermetfan/prefix
return length and width from utils::prefix(_length)
2017-02-01 11:56:04 -08:00
Robin Stumm
99fa86bec9 return length and width from utils::prefix() (renamed from utils::prefix_length()) as per df835d1 2017-02-01 20:47:33 +01:00
Alexandre Bury
412f3304f3 Merge pull request #104 from hyst329/master
Fixes issue #103
2017-02-01 10:13:06 -08:00
hyst329
35c0cb1050 Added *-backend features 2017-02-01 20:59:17 +03:00
Alexandre Bury
df835d1a10 utils::prefix_length: move current_width out of the scan loop
To prepare returning both length and width.
2017-01-31 16:31:34 -08:00
Alexandre Bury
e0e96ab875 Merge pull request #105 from dermetfan/nix-shell
add shell.nix file for Nix users
2017-01-31 11:15:17 -08:00
Robin Stumm
6594e393b8 add shell.nix file for Nix users 2017-01-31 19:38:38 +01:00
hyst329
4755cc8aee Fixed library name capitalising 2017-01-30 18:19:03 +03:00
hyst329
ae33abec18 Fixed build on Windows 2017-01-30 18:17:05 +03:00
Alexandre Bury
8b88bf9ba2 Add Menubar::is_empty(&self)
And fix another clippy warning
2017-01-27 14:51:46 -08:00
Alexandre Bury
1b5cb4a89a Fix travis badge in Cargo.toml 2017-01-24 10:49:02 -08:00
Alexandre Bury
afc681bcf4 Add Canvas::state_mut(&mut self)
And missing Canvas::needs_relayout closure.
2017-01-24 10:48:00 -08:00
Alexandre Bury
146a532df0 Bump version to 0.4.0 2017-01-23 22:55:06 -08:00
Alexandre Bury
d7eaa5a086 Rename View::get_min_size -> required_size 2017-01-23 22:53:03 -08:00
Alexandre Bury
451d27b58e Fix Canvas doc comment 2017-01-23 22:03:39 -08:00
Alexandre Bury
26e6f4ff97 Add Canvas view 2017-01-23 22:01:25 -08:00
Alexandre Bury
c970712c3b Add TextView::append_content
Also don't strip the newline anymore when setting content.
Instead, just ignore trailing newline when computing rows.
2017-01-23 20:22:43 -08:00
Alexandre Bury
b8621df74d Update lorem screenshot 2017-01-23 18:58:48 -08:00
Alexandre Bury
f504ad8f0e Add fullscreen layers to StackView
Fixes #87
2017-01-23 18:54:52 -08:00
Alexandre Bury
053544d192 Fix inverted outset color
Update the `theme` screenshot
2017-01-23 17:53:53 -08:00
Alexandre Bury
fa82690c10 Fix docs for Cursive::menubar()
... again
2017-01-23 16:54:27 -08:00
Alexandre Bury
0977daa12d Unify method names on Menubar and MenuTree 2017-01-23 16:51:48 -08:00
Alexandre Bury
24b342ced8 Fix doc for Cursive::menubar() 2017-01-23 15:58:38 -08:00
Alexandre Bury
ed841825f2 Add methods to edit menubar and menutrees
Fixes #101
2017-01-23 15:50:56 -08:00
Alexandre Bury
0849ae6efa Add comments 2017-01-21 15:06:31 -08:00
Alexandre Bury
8ae34b05dd Add Cargo categories & travis badge 2017-01-21 13:30:15 -08:00
Alexandre Bury
3ecae579e8 Adjust the scroll after setting the scroll strategy 2017-01-21 11:46:56 -08:00
Alexandre Bury
924c74afbe Add ScrollStrategy to TextView 2017-01-21 11:44:40 -08:00
Alexandre Bury
dccce56f6e Fix off-by-1 errors on termion
Termion's Goto is 1-based, Cursive's print_at is 0-based
2017-01-19 13:44:49 -08:00
Alexandre Bury
06ce7b570f Fix clippy warnings 2017-01-19 11:12:12 -08:00
Alexandre Bury
efa45bb509 Bump version to 0.3.7 2017-01-15 10:28:03 -08:00
Alexandre Bury
97287a0b0b Remove unused imports 2017-01-10 17:48:47 -08:00
Alexandre Bury
14f971e2bc Allow negative relative offset in Position
Was causing crashes when popup-SelectViews were larger than their
parent.
Made some methods on Vec2 more generic to XY<T: ...>
2017-01-10 17:47:31 -08:00
Alexandre Bury
ddff15b6cf Merge pull request #96 from Ameobea/termion-clearing
Fixed issue with resetting background color for Termion backend
2017-01-10 17:45:39 -08:00
Alexandre Bury
bc500fb9e4 Merge pull request #95 from Ameobea/listview-callbacks
Added functions to register callbacks for ListView
2017-01-10 17:44:55 -08:00
Casey Primozic
7ca9821145 Fixed issue with resetting background color for Termion backend
- Background color was being set back to the theme's background color rather than the terminal's background color when the backend was `finish()`ed.  This resets the background color to the default instead.
2017-01-10 19:22:05 -06:00