forked from iced-rs/iced
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebase 2024-11-04 onto 50340b4 #186
Open
ryanabx
wants to merge
36
commits into
pop-os:master
Choose a base branch
from
ryanabx-contrib:rebase-2024-11-04
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
f4d0387
Dismiss `large-enum-variant` lint
hecrj 415fd4f
Use BTreeMap for Ord iteration of panes
tarkah 9ac3318
Retain widget state against incoming panes
tarkah 5ebd8ac
Keep `Pane` associated to state / layout after swap
tarkah 659669d
Remove duplicated `maximized` state in `pane_grid`
hecrj 089e629
Fix `responsive` diffing when `Tree` is emptied by ancestors
hecrj 55504ff
Rename `state::Widget` to `pane_grid::Memory`
hecrj d08bc6e
Add `relabel` helper to `pane_grid::State`
hecrj 17b35df
Merge pull request #2628 from tarkah/fix/pane-grid-continuity
hecrj 6ed88f7
Prevent unintended keyboard input during focus.
kosayoda d660fad
Merge pull request #2649 from kosayoda/window-focus-fix
hecrj f3733a8
Use float total_cmp instead of partial_cmp to get a total order.
50340b4
Merge pull request #2651 from rhogenson/total-cmp
hecrj c75a4cf
Use crates.io release for `winit`
hecrj 35ac38e
feat: pop-os megasquash
wash2 50ef09a
Make iced_wgpu build on redox
jackpot51 98b74cd
add reserved Id
wash2 441025d
cleanup
wash2 e6d66f6
fix: derive serde traits
wash2 0e5f000
cargo fmt
wash2 e464f66
clippy
wash2 bfe5051
fix: scrollable direction
wash2 7453ec2
Fix doc links
jackpot51 c0eaafb
fix: docs
wash2 1e1d8e9
refactor: disable wayland in winit shell by default
wash2 bbef04a
fix: log warning instead of panicing for current_monitor
wash2 aa65669
fix: filter out events with no window id, if the window id is needed
wash2 13765e2
fix(sctk): reduce event spam for redraw requests
wash2 fa5b864
Implement fill_raw
jackpot51 2243951
fix: slider rendering
wash2 4d61c1c
refactor: apply requested size for surface after creation
wash2 aff405f
fix: reverse sctk scroll direction
wash2 610a315
improv: expose set_blur
edfloreshz 703133f
fix: use enable and disable methods
edfloreshz 8aa549d
fix: documentation
edfloreshz e72dbf1
fix: scrollbar width
git-f0x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "iced_accessibility" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
# TODO Ashley re-export more platform adapters | ||
[features] | ||
async-io = ["accesskit_winit?/async-io"] | ||
tokio = ["accesskit_winit?/tokio"] | ||
|
||
[dependencies] | ||
accesskit = { git = "https://github.com/wash2/accesskit", tag = "iced-xdg-surface-0.13" } | ||
accesskit_windows = { git = "https://github.com/wash2/accesskit", tag = "iced-xdg-surface-0.13", optional = true } | ||
accesskit_macos = { git = "https://github.com/wash2/accesskit", tag = "iced-xdg-surface-0.13", optional = true } | ||
accesskit_winit = { git = "https://github.com/wash2/accesskit", tag = "iced-xdg-surface-0.13", optional = true, default-features = false, features = [ | ||
"rwh_06", | ||
] } | ||
# accesskit = { path = "../../../../accesskit/common" } | ||
# accesskit_windows = { path = "../../../../accesskit/platforms/windows", optional = true } | ||
# accesskit_macos = { path = "../../../../accesskit/platforms/macos", optional = true } | ||
# accesskit_winit = { path = "../../../../accesskit/platforms/winit", optional = true, default-features = false, features = [ | ||
# "rwh_06", | ||
# ] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
use crate::{A11yId, A11yNode, IdEq}; | ||
|
||
#[derive(Debug, Clone, Default)] | ||
/// Accessible tree of nodes | ||
pub struct A11yTree { | ||
/// The root of the current widget, children of the parent widget or the Window if there is no parent widget | ||
root: Vec<A11yNode>, | ||
/// The children of a widget and its children | ||
children: Vec<A11yNode>, | ||
} | ||
|
||
impl A11yTree { | ||
/// Create a new A11yTree | ||
/// XXX if you use this method, you will need to manually add the children of the root nodes | ||
pub fn new(root: Vec<A11yNode>, children: Vec<A11yNode>) -> Self { | ||
Self { root, children } | ||
} | ||
|
||
pub fn leaf<T: Into<A11yId>>(node: accesskit::NodeBuilder, id: T) -> Self { | ||
Self { | ||
root: vec![A11yNode::new(node, id)], | ||
children: vec![], | ||
} | ||
} | ||
|
||
/// Helper for creating an A11y tree with a single root node and some children | ||
pub fn node_with_child_tree(mut root: A11yNode, child_tree: Self) -> Self { | ||
root.add_children( | ||
child_tree.root.iter().map(|n| n.id()).cloned().collect(), | ||
); | ||
Self { | ||
root: vec![root], | ||
children: child_tree | ||
.children | ||
.into_iter() | ||
.chain(child_tree.root) | ||
.collect(), | ||
} | ||
} | ||
|
||
/// Joins multiple trees into a single tree | ||
pub fn join<T: Iterator<Item = Self>>(trees: T) -> Self { | ||
trees.fold(Self::default(), |mut acc, A11yTree { root, children }| { | ||
acc.root.extend(root); | ||
acc.children.extend(children); | ||
acc | ||
}) | ||
} | ||
|
||
pub fn root(&self) -> &Vec<A11yNode> { | ||
&self.root | ||
} | ||
|
||
pub fn children(&self) -> &Vec<A11yNode> { | ||
&self.children | ||
} | ||
|
||
pub fn root_mut(&mut self) -> &mut Vec<A11yNode> { | ||
&mut self.root | ||
} | ||
|
||
pub fn children_mut(&mut self) -> &mut Vec<A11yNode> { | ||
&mut self.children | ||
} | ||
|
||
pub fn contains(&self, id: &A11yId) -> bool { | ||
self.root.iter().any(|n| IdEq::eq(n.id(), id)) | ||
|| self.children.iter().any(|n| IdEq::eq(n.id(), id)) | ||
} | ||
} | ||
|
||
impl From<A11yTree> for Vec<(accesskit::NodeId, accesskit::Node)> { | ||
fn from(tree: A11yTree) -> Vec<(accesskit::NodeId, accesskit::Node)> { | ||
tree.root | ||
.into_iter() | ||
.map(|node| node.into()) | ||
.chain(tree.children.into_iter().map(|node| node.into())) | ||
.collect() | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what happened here, none of the commits from iced/master should have my name as the committer...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically c75a4cf if that didn't show up with my comment