mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
A Window can now be resizable in only one direction (#4155)
For instance: `Window::new(…).resizable([true, false])` is a window that is only resizable in the horizontal direction. This PR also removes a hack added in https://github.com/emilk/egui/pull/3039 which is no longer needed since https://github.com/emilk/egui/pull/4026
This commit is contained in:
@@ -13,6 +13,7 @@ impl super::Demo for About {
|
||||
.default_width(320.0)
|
||||
.default_height(480.0)
|
||||
.open(open)
|
||||
.resizable([true, false])
|
||||
.show(ctx, |ui| {
|
||||
use super::View as _;
|
||||
self.ui(ui);
|
||||
|
||||
@@ -75,6 +75,7 @@ impl super::Demo for CodeExample {
|
||||
.default_size([800.0, 400.0])
|
||||
.vscroll(false)
|
||||
.hscroll(true)
|
||||
.resizable([true, false])
|
||||
.show(ctx, |ui| self.ui(ui));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ impl super::Demo for WidgetGallery {
|
||||
fn show(&mut self, ctx: &egui::Context, open: &mut bool) {
|
||||
egui::Window::new(self.name())
|
||||
.open(open)
|
||||
.resizable(true)
|
||||
.resizable([true, false])
|
||||
.default_width(280.0)
|
||||
.show(ctx, |ui| {
|
||||
use super::View as _;
|
||||
|
||||
Reference in New Issue
Block a user