Commit graph

33 commits

Author SHA1 Message Date
Ian Douglas Scott
874245bc2e Use aliasable in AxisToplevelLayout to use slice in argument
This makes layouts possible to compose without clones.
2025-03-24 14:59:25 -07:00
Ian Douglas Scott
52bbc6c083 Fix warnings and remove dbg! 2025-02-10 12:04:20 -08:00
Ian Douglas Scott
b5d2eed726 toplevel_layout: Add AxisToplevelLayout helper 2025-02-06 15:09:57 -08:00
Ian Douglas Scott
1342e37ad6 toplevel_layout: Make size depend on axis 2025-02-06 13:45:34 -08:00
Ian Douglas Scott
eb69aba7b2 toplevel_layout: Move logic into a requested_main_total method 2025-02-06 13:40:45 -08:00
Ian Douglas Scott
e032b0b5ee Center toplevels if they don't fill space 2025-01-22 13:42:04 -08:00
Ian Douglas Scott
392adda651 Run cargo clippy --fix 2025-01-15 11:53:59 -08:00
Vukašin Vojinović
fe1363ea42 fix(interface): align closer to designs 2025-01-15 11:49:54 -08:00
Ian Douglas Scott
faa4a51fb9 Toplevel layout abstraction 2025-01-13 13:13:53 -08:00
Ian Douglas Scott
b70828e23f Update iced/libcosmic 2025-01-13 10:26:45 -08:00
Ian Douglas Scott
d05dfd7016 Add spacing between workspaces 2024-05-02 08:05:51 -07:00
Ian Douglas Scott
d759e1d7c2 Use cosmic_bg_config to get background
Scaling doesn't match `cosmic-bg`?
2024-04-30 12:49:08 -07:00
Ian Douglas Scott
96cca005b7 Rename inaccurately named widget 2024-04-25 14:17:43 -07:00
Ian Douglas Scott
7997d58ce7 Fix clippy lints 2024-04-24 13:51:20 -07:00
Ian Douglas Scott
ee1d54a12b Format imports 2024-04-24 13:00:40 -07:00
Ian Douglas Scott
8365efb30d Fix VisibilityWrapper widget
I believe this fixes how the widget works, though it's hard to tell
since the behavior was inconsistent.

There are still issues related to drag-and-drop in cosmic-comp or
`iced_sctk`, which need to be fixed to get things working fully.
2024-04-22 10:16:41 -07:00
Ian Douglas Scott
6f45933971 Fix various warnings 2024-04-19 15:44:55 -07:00
Ian Douglas Scott
09e03cd096 Hide toplevel from toplevel list when it is being dragged
Uses a custom wrapper widget, that makes `draw` do nothing when visible
is set to false.

This works well sometimes, but can cause weird bugs...
2024-04-19 15:28:16 -07:00
Ian Douglas Scott
7106001179 Address various warnings 2024-03-05 12:25:20 -08:00
Ian Douglas Scott
0dd3abf62c widgets/image_bg: Use layer in rendering
Fixes behavior with wgpu. It seemed to work with software renderer.
2024-02-29 15:51:55 -08:00
Ian Douglas Scott
015f61922b Update libcosmic 2024-02-06 13:32:29 -08:00
Ian Douglas Scott
d50c1f13f6 Fix subtract overflow 2024-01-26 13:04:58 -08:00
Ian Douglas Scott
82951822b9 If toplevels don't fit, scale by same factor 2024-01-22 17:19:46 -08:00
Ian Douglas Scott
7d0882162b Spacing fix 2024-01-22 13:40:10 -08:00
Ian Douglas Scott
99aeca0f2f Custom Toplevels widget
Fixes centering on toplevels.

Need to use fewer hacks, and add equal scale factor.

See if Iced layout system can be improved.
2024-01-19 15:32:54 -08:00
Ian Douglas Scott
ec5dceeed2 Custom widget to avoid stretching toplevel items
Avoids close button aligned way to right. And fixes offset for drag
surface.

But left aligns workspaces (need new container?).
2024-01-19 14:42:06 -08:00
Ian Douglas Scott
aac02973c1 Remove unused import 2023-12-20 14:46:43 -08:00
Ian Douglas Scott
06c37e39f5 WIP custom cursor for drag and drop 2023-12-15 15:46:41 -08:00
Ian Douglas Scott
d56a591a9f Passthrough widget implementation with treating as child 2023-12-15 13:39:02 -08:00
Ian Douglas Scott
c4adca76c0 Use delegate crate to simplify things a bit. 2023-12-15 13:33:29 -08:00
Ian Douglas Scott
0cebd30600 Fix excessive vertical height taken by button 2023-12-14 16:29:45 -08:00
Ian Douglas Scott
3ef8800fb4 Show background image
Harcoded path for now.
2023-12-13 17:58:38 -08:00
Ian Douglas Scott
a3e3bec885 Custom widget for sidebar; closing workspace
Need custom widget currently to distribute space correctly.
2023-12-13 15:54:33 -08:00