Rename ComboBox to PickList
This commit is contained in:
parent
2118a726f8
commit
73b8ae8e5e
17 changed files with 80 additions and 80 deletions
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "combo_box"
|
||||
name = "pick_list"
|
||||
version = "0.1.0"
|
||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
|
@ -7,5 +7,3 @@ publish = false
|
|||
|
||||
[dependencies]
|
||||
iced = { path = "../..", features = ["debug"] }
|
||||
iced_native = { path = "../../native" }
|
||||
iced_wgpu = { path = "../../wgpu" }
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
use iced::{
|
||||
button, combo_box, scrollable, Align, Button, ComboBox, Container, Element,
|
||||
Length, Sandbox, Scrollable, Settings, Space, Text,
|
||||
button, pick_list, scrollable, Align, Button, Container, Element, Length,
|
||||
PickList, Sandbox, Scrollable, Settings, Space, Text,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
|
|
@ -11,7 +11,7 @@ pub fn main() {
|
|||
struct Example {
|
||||
scroll: scrollable::State,
|
||||
button: button::State,
|
||||
combo_box: combo_box::State,
|
||||
pick_list: pick_list::State,
|
||||
selected_language: Language,
|
||||
}
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ impl Sandbox for Example {
|
|||
}
|
||||
|
||||
fn title(&self) -> String {
|
||||
String::from("Combo box - Iced")
|
||||
String::from("Pick list - Iced")
|
||||
}
|
||||
|
||||
fn update(&mut self, message: Message) {
|
||||
|
|
@ -42,8 +42,8 @@ impl Sandbox for Example {
|
|||
}
|
||||
|
||||
fn view(&mut self) -> Element<Message> {
|
||||
let combo_box = ComboBox::new(
|
||||
&mut self.combo_box,
|
||||
let pick_list = PickList::new(
|
||||
&mut self.pick_list,
|
||||
&Language::ALL[..],
|
||||
Some(self.selected_language),
|
||||
Message::LanguageSelected,
|
||||
|
|
@ -58,7 +58,7 @@ impl Sandbox for Example {
|
|||
.spacing(10)
|
||||
.push(Space::with_height(Length::Units(800)))
|
||||
.push(Text::new("Which is your favorite language?"))
|
||||
.push(combo_box);
|
||||
.push(pick_list);
|
||||
|
||||
content = content
|
||||
.push(button)
|
||||
Loading…
Add table
Add a link
Reference in a new issue