Rename `fn scroll2` to `fn scroll` (#4282)
This commit is contained in:
parent
1354c3e19a
commit
549b243228
|
|
@ -337,6 +337,16 @@ impl ScrollArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Turn on/off scrolling on the horizontal/vertical axes.
|
/// Turn on/off scrolling on the horizontal/vertical axes.
|
||||||
|
///
|
||||||
|
/// You can pass in `false`, `true`, `[false, true]` etc.
|
||||||
|
#[inline]
|
||||||
|
pub fn scroll(mut self, scroll_enabled: impl Into<Vec2b>) -> Self {
|
||||||
|
self.scroll_enabled = scroll_enabled.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Turn on/off scrolling on the horizontal/vertical axes.
|
||||||
|
#[deprecated = "Renamed to `scroll`"]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn scroll2(mut self, scroll_enabled: impl Into<Vec2b>) -> Self {
|
pub fn scroll2(mut self, scroll_enabled: impl Into<Vec2b>) -> Self {
|
||||||
self.scroll_enabled = scroll_enabled.into();
|
self.scroll_enabled = scroll_enabled.into();
|
||||||
|
|
|
||||||
|
|
@ -328,9 +328,19 @@ impl<'open> Window<'open> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable/disable horizontal/vertical scrolling. `false` by default.
|
/// Enable/disable horizontal/vertical scrolling. `false` by default.
|
||||||
|
///
|
||||||
|
/// You can pass in `false`, `true`, `[false, true]` etc.
|
||||||
|
#[inline]
|
||||||
|
pub fn scroll(mut self, scroll: impl Into<Vec2b>) -> Self {
|
||||||
|
self.scroll = self.scroll.scroll(scroll);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enable/disable horizontal/vertical scrolling. `false` by default.
|
||||||
|
#[deprecated = "Renamed to `scroll`"]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn scroll2(mut self, scroll: impl Into<Vec2b>) -> Self {
|
pub fn scroll2(mut self, scroll: impl Into<Vec2b>) -> Self {
|
||||||
self.scroll = self.scroll.scroll2(scroll);
|
self.scroll = self.scroll.scroll(scroll);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ impl super::Demo for CodeExample {
|
||||||
.open(open)
|
.open(open)
|
||||||
.min_width(375.0)
|
.min_width(375.0)
|
||||||
.default_size([390.0, 500.0])
|
.default_size([390.0, 500.0])
|
||||||
.scroll2(false)
|
.scroll(false)
|
||||||
.resizable([true, false])
|
.resizable([true, false])
|
||||||
.show(ctx, |ui| self.ui(ui));
|
.show(ctx, |ui| self.ui(ui));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ impl super::Demo for InputTest {
|
||||||
.default_width(800.0)
|
.default_width(800.0)
|
||||||
.open(open)
|
.open(open)
|
||||||
.resizable(true)
|
.resizable(true)
|
||||||
.scroll2(false)
|
.scroll(false)
|
||||||
.show(ctx, |ui| {
|
.show(ctx, |ui| {
|
||||||
use super::View as _;
|
use super::View as _;
|
||||||
self.ui(ui);
|
self.ui(ui);
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ impl super::Demo for WindowOptions {
|
||||||
.constrain(constrain)
|
.constrain(constrain)
|
||||||
.collapsible(collapsible)
|
.collapsible(collapsible)
|
||||||
.title_bar(title_bar)
|
.title_bar(title_bar)
|
||||||
.scroll2(scroll2)
|
.scroll(scroll2)
|
||||||
.enabled(enabled);
|
.enabled(enabled);
|
||||||
if closable {
|
if closable {
|
||||||
window = window.open(open);
|
window = window.open(open);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue