Skip to content

Commit

Permalink
Upgrade egui to 0.26. TODO: fix drag&drop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adanos020 committed Feb 5, 2024
1 parent 748936f commit 7e04bc9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### Added
- `filter_map_tabs`, `filter_tabs`, and `retain_tabs` ([#217](https://github.com/Adanos020/egui_dock/pull/217))

### Breaking changes
- Upgraded to egui 0.26

## 0.10.0 - 2024-01-09

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ default = []
serde = ["dep:serde", "egui/serde"]

[dependencies]
egui = { version = "0.25", default-features = false }
egui = { version = "0.26", default-features = false }
serde = { version = "1", optional = true, features = ["derive"] }

duplicate = "1.0"
paste = "1.0"

[dev-dependencies]
eframe = { version = "0.25", default-features = false, features = [
eframe = { version = "0.26", default-features = false, features = [
"default_fonts",
"glow",
] }
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![github](https://img.shields.io/badge/github-Adanos020/egui_dock-8da0cb?logo=github)](https://github.com/Adanos020/egui_dock)
[![Crates.io](https://img.shields.io/crates/v/egui_dock)](https://crates.io/crates/egui_dock)
[![docs.rs](https://img.shields.io/docsrs/egui_dock)](https://docs.rs/egui_dock/)
[![egui_version](https://img.shields.io/badge/egui-0.25-blue)](https://github.com/emilk/egui)
[![egui_version](https://img.shields.io/badge/egui-0.26-blue)](https://github.com/emilk/egui)

Originally created by [@lain-dono](https://github.com/lain-dono), this library provides a docking system for `egui`.

Expand Down Expand Up @@ -32,8 +32,8 @@ Add `egui` and `egui_dock` to your project's dependencies.

```toml
[dependencies]
egui = "0.25"
egui_dock = "0.10"
egui = "0.26"
egui_dock = "0.11"
```

Then proceed by setting up `egui`, following its [quick start guide](https://github.com/emilk/egui#quick-start).
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dock_area/drag_and_drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn draw_highlight_rect(rect: Rect, ui: &Ui, style: &Style) {
style.overlay.hovered_leaf_highlight.rounding,
style.overlay.hovered_leaf_highlight.color,
style.overlay.hovered_leaf_highlight.stroke,
)
);
}

// Draws one of the Tab drop destination icons inside `rect`, which one you get is specified by `is_top_bottom`.
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/dock_area/show/leaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ impl<'tree, Tab> DockArea<'tree, Tab> {

if let Some(pos) = state.last_hover_pos {
if scroll_bar_rect.contains(pos) {
*scroll += ui.input(|i| i.scroll_delta.y + i.scroll_delta.x)
*scroll += ui.input(|i| i.smooth_scroll_delta.y + i.smooth_scroll_delta.x)
* points_to_scroll_coefficient;
}
}
Expand All @@ -712,7 +712,7 @@ impl<'tree, Tab> DockArea<'tree, Tab> {

// Handle user input.
if tabbar_response.hovered() {
*scroll += ui.input(|i| i.scroll_delta.y + i.scroll_delta.x);
*scroll += ui.input(|i| i.smooth_scroll_delta.y + i.smooth_scroll_delta.x);
}
}

Expand Down

0 comments on commit 7e04bc9

Please sign in to comment.