Comments (4)
Possible work around: disable all drawing by the SidePanel
and emulate it from the closure:
impl eframe::App for MyApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show(ctx, |ui| {
egui::TopBottomPanel::bottom("bottom")
.resizable(true)
.show_animated_inside(ui, true, |ui| {
egui::ScrollArea::vertical().show(ui, |ui| {
for _ in 0..20 {
ui.label("bottom panel");
}
})
});
egui::SidePanel::left("left panel")
.resizable(true)
.frame(egui::Frame::default())
.show_separator_line(false)
.show_animated_inside(ui, true, |ui| {
ui.painter()
.rect_filled(ui.max_rect(), 0.0, egui::Color32::RED);
ui.painter().vline(
ui.max_rect().right(),
ui.max_rect().y_range(),
ui.style().visuals.widgets.noninteractive.bg_stroke,
);
ui.set_clip_rect(ui.max_rect());
for _ in 0..20 {
ui.label("left panel");
}
});
});
}
}
Note:
- for a better effect, the outer
CentralPanel
must have zero inner margin - this work around is imperfect: the on-hover separator line still overlaps the bottom panel
from egui.
An obvious workaround is to wrap the entire content of the SidePanel
in a ScrollArea
. However, this is not convenient in every case, for example when the panel content is already made of multiple, independent scroll areas (e.g. rerun's left panel).
from egui.
May be related to #4349
from egui.
I think we need two things to solve this:
- Add a clip-rect for panels, so that if they overflow, it is invisible
- Respect the clip-rect in the interaction code, so you cannot hover/click invisible stuff
from egui.
Related Issues (20)
- Gif Support HOT 1
- Custom light & dark themes on system theme change HOT 1
- Add a User-Agent header to HTTP image loader HOT 5
- Dithering in Fragment Shader HOT 1
- moving the mouse outside of the window will still cause the window to update
- Mobile web text editing tracking issue
- `include_image!` macro should take in an `expr` not a `literal`
- Phantom key presses when focusing an egui/winit window HOT 3
- Configurable plot cursor "snap" radius HOT 1
- TableBuilder / available_width() HOT 1
- Smooth zooming
- High CPU usage when accesskit enabled HOT 11
- Crashing on startup HOT 4
- Zoom out the plot with right mouse drag
- Store a Ui/Frame-stack
- Sizing-pass flag
- Wayland dependencies are pulled in for eframe, even when `wayland` feature is disabled. HOT 1
- egui_plot legend: add shortcut to hide all series but this one
- Grid layout for windows HOT 3
- Input not focused when selecting text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egui.