Commit graph

56 commits

Author SHA1 Message Date
Michael Aaron Murphy
2c680c8ae0 chore(color_picker): specify imports 2023-10-12 16:37:38 +02:00
Michael Aaron Murphy
e1d1b0bad5 feat(widget): initial implementation of Grid widget 2023-10-02 17:32:39 +02:00
Ashley Wulber
70077ca985 feat: color picker 2023-10-02 10:24:43 -04:00
Michael Aaron Murphy
9ceda6d704 feat(widget): add navigation with page_list_item and sub_page_header 2023-09-19 17:22:20 +02:00
Michael Aaron Murphy
1e3c44865a feat(widget): import more widgets from iced 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
9eb55ce893 feat(widget): add tooltip module 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
87e7567b7b feat(widget): add divider::vertical variants 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
6e1f00295b feat(widget): add divider::horizontal::default() variant 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
03a5c929fd refactor(widget): create alias for Row type 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
524f3abb05 refactor(widget): create alias for Column type 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
4e4eeaac12 feat!(widget): rewrite button & icon widget APIs 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
26777464c5 feat(widget): add functions for columns and rows 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
e9035a9582 chore(widget): add more iced widget re-exports 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
6383ecc0cb chore(widget): text_input does not need to be wayland-only 2023-09-14 01:38:56 +02:00
Michael Aaron Murphy
c45556d8e3 feat(widget): add typography functions to text module 2023-09-14 01:38:56 +02:00
Ashley Wulber
984d545546 fix: remove conflicting iced text_input from reexports 2023-08-29 14:59:37 -04:00
Michael Aaron Murphy
2e3d9af720 chore(widget): re-export missing iced widgets 2023-08-28 18:11:19 +02:00
Ashley Wulber
db8e791b87
Text input (#143)
* update: iced 0.10.0

* wip: text input

* wip: text inputs with icons and buttons

* wip: improve text input

* refactor: text input styling

* chore: add scale factor

* chore(text_input): add winit example and do some cleanup
2023-08-23 10:59:26 -04:00
Ashley Wulber
ab88a5b59f feat: animated image widget 2023-07-26 18:11:19 -04:00
Ashley Wulber
f17d52f37f card widget 2023-07-20 11:11:50 -04:00
Michael Aaron Murphy
e3f30a1b5c feat(widget): add FlexRow widget 2023-06-24 12:30:52 +02:00
Ian Douglas Scott
98ec1bbd48
Add a Popover widget, that shows a widget in an overlay (#100)
This serves a similar purpose to `GtkPopover`. It takes two widgets, one
to show normally and one to show in an overlay.

This should basically work, though more options could be added here.
2023-05-11 13:29:05 -07:00
Ashley Wulber
becdbb6eb3 wip: use CosmicContainer 2023-02-28 12:26:38 -07:00
Michael Aaron Murphy
a1b3d6ec38 feat(widget): add COSMIC search widget 2023-01-30 21:57:24 +01:00
Michael Aaron Murphy
9a095e4d94 feat(divider): add functions for divider style variants of a Rule 2023-01-30 21:57:24 +01:00
Michael Aaron Murphy
b3a3c9c29a feat(widget): add text function with Cow<str> input 2023-01-30 21:57:24 +01:00
Michael Aaron Murphy
b3d550cc5e feat!(segmented-button): improved interfaces and documentation
BREAKING CHANGE: Various type and function names have changed to reflect
themselves better in documentation. Code has been reorganized into
separate modules with a better placement in libcosmic. Most of the
functions, types, and modules now have documentation and examples.

These changes no longer require the `Model` type to define the
data/component type that it stores. The component functionality is now
optional, and it's also possible to associate many components to an item
with one component per type. This has had a side effect of simplifying a
lot of the type signatures in the implementation.

Before, to insert an item into the model, you had to define a
`SegmentedItem` and a `Component` on insert, and get back an ID for that
item. Which makes it difficult to define an item that contains only an
icon or has no components. And requires an extra insert function to
activate the item on insert.

Now, there is a flexible builder-style API for configuring
newly-inserted items in the model. So the complexity for inserting and
retrieving values from the model has decreased significantly
2023-01-19 19:58:31 +01:00
Eduardo Flores
abf8fc96c2 feat(widget): add warning widget 2023-01-17 16:49:52 +01:00
Michael Aaron Murphy
352bf8e401 improv: use current design for nav bar toggle button 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
dd29f958af feat: add nav_bar widget based on vertical view switcher 2023-01-10 20:49:49 +01:00
Michael Aaron Murphy
357de5e9be
improv(segmented-button): Express vertical/horizontal variants as a state machine
It's difficult to make iterative developments when there's two
nearly-identical types that need to be kept synchronized to any change.
Rust gives us traits so we should use them instead of duplicating code.

This made it easier to make styling and layout improvements to both
instances of the segmented button.
2023-01-04 05:55:27 +01:00
Victoria Brekenfeld
75687acf2f chore: apply cargo fmt 2023-01-04 05:46:24 +01:00
Michael Aaron Murphy
444e389496 refactor!: separate horizontal and vertical segmented button widgets
- Removes the orientation enum in favor of two separate widgets
- Implements the spacing attribute for both widgets
- Demo is updated to display spaced variants of the widgets
2023-01-03 20:29:50 +01:00
Michael Aaron Murphy
de580ffefc feat(widget): add an Orientation::{Horizontal,Vertical} enum 2023-01-03 00:12:28 -05:00
Michael Aaron Murphy
e97c258422 feat: implement SegmentedButton widget 2022-12-28 10:19:03 -05:00
Ashley Wulber
01701759c9 fix: make sure that lazy widgets have calculated their element before calling layout 2022-12-27 22:38:49 +01:00
Ashley Wulber
50b8131e21 feat: aspect ratio limiting container 2022-12-18 14:07:08 +01:00
Ashley Wulber
8b1014a754 feat: rectangle tracker container 2022-12-15 00:25:47 +01:00
Eduardo Flores
200784b6c1
feat(widget): Add spin_button widget
Co-authored-by: Michael Aaron Murphy <michael@mmurphy.dev>
2022-12-07 00:17:34 +01:00
Ashley Wulber
9796fa9f15
Merge branch 'cosmic-design-system' into sctk-cosmic-design-system 2022-12-06 17:03:31 -05:00
Michael Aaron Murphy
37f978d1b3
wip: Various refactorings and improvements 2022-12-06 16:14:39 +01:00
Ashley Wulber
33779b8652
wip: popup helpers 2022-11-15 23:11:48 +01:00
Eduardo Flores
07e53ddadd Reimplemented NavigationBar
- Navigation Bar was reimplemented to support sections and pages.
- Created new widget called separator, a horizontal rule with the COSMIC
  theme.
2022-10-13 11:42:13 +02:00
Eduardo Flores
420d3c3dfc Changed the file structure 2022-10-13 11:42:13 +02:00
Eduardo Flores
7743d0d084 Implemented Expander
- Updated example to show behavior
- Created styles for Expander and ExpanderRow
- Simpler implementation of `ExpanderRow`
- Deleted `ExpanderData` and replaced it with `ExpanderRow`
- Every row can now have child rows.
- Ran cargo fmt.
- Deleted settings example
- Added expander to cosmic example
- Expander icons now render

ListBox partially implemented
2022-10-13 11:42:13 +02:00
Eduardo Flores
67ff797018 New approach to the HeaderBar widget 2022-10-09 12:56:47 +02:00
Eduardo Flores
5949eb8d89 Initial implementation of Expander widget 2022-10-09 12:56:47 +02:00
Eduardo Flores
5c859fa1df Widget implementation for NavBar
- Implemented NavBar as a Widget
2022-10-09 12:56:47 +02:00
Eduardo Flores
9210179731 Swapped scrollable for cosmic::scrollable
- Renamed scrollbar to scrollable
2022-10-08 20:59:53 +02:00
Eduardo Flores
4ae03278cc Fixed sidebar responsiveness
- Created new widget `scrollbar` which can adopt COSMIC styling.
- Increased sidebar icon size by 4 pixels to improve visibility.
- Added padding inside the navigation bar to prevent collision with the scrollbar.
- Increased the max width of the condensed navbar for the scrollbar.
2022-10-07 14:06:27 +02:00