mirror of
https://github.com/obsqrbtz/egui_knob.git
synced 2026-04-08 20:19:17 +03:00
fix: knob rect
This commit is contained in:
3781
examples/Cargo.lock
generated
3781
examples/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
[package]
|
||||
name = "egui_knob_demo"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
|
||||
[[bin]]
|
||||
name = "egui_knob_demo"
|
||||
path = "demo.rs"
|
||||
|
||||
[dependencies]
|
||||
egui = "0.30"
|
||||
egui_knob = "0.1.1"
|
||||
eframe = { version = "0.30.0", features = ["default_fonts"] }
|
||||
@@ -23,13 +23,11 @@ impl eframe::App for KnobExample {
|
||||
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.add_space(15.0);
|
||||
ui.add(
|
||||
Knob::new(&mut self.value, 0.0, 100.0, egui_knob::KnobStyle::Dot)
|
||||
.with_label("Gain", egui_knob::LabelPosition::Bottom)
|
||||
.with_size(50.0),
|
||||
);
|
||||
ui.add_space(15.0);
|
||||
ui.add(
|
||||
Knob::new(&mut self.value, 0.0, 100.0, egui_knob::KnobStyle::Wiper)
|
||||
.with_label("Gain", egui_knob::LabelPosition::Bottom)
|
||||
Reference in New Issue
Block a user