mirror of
https://github.com/13hannes11/focus_annotator.git
synced 2024-09-03 23:21:01 +02:00
add separator to slider
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -38,20 +38,28 @@ fn main() {
|
|||||||
.margin_start(MARGIN_LEFT)
|
.margin_start(MARGIN_LEFT)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
let adjustment = Adjustment::builder()
|
||||||
|
.lower(0.0)
|
||||||
|
.upper(10.0)
|
||||||
|
.value(5.0)
|
||||||
|
.step_increment(1.0)
|
||||||
|
.build();
|
||||||
|
|
||||||
let scale = Scale::builder()
|
let scale = Scale::builder()
|
||||||
.orientation(Orientation::Vertical)
|
.orientation(Orientation::Vertical)
|
||||||
.adjustment(&adjustment)
|
.adjustment(&adjustment)
|
||||||
.vexpand(true)
|
.vexpand(true)
|
||||||
.margin_top(MARGIN_TOP)
|
.margin_top(MARGIN_TOP)
|
||||||
.margin_bottom(MARGIN_BOTTOM)
|
.margin_bottom(MARGIN_BOTTOM)
|
||||||
.margin_start(MARGIN_LEFT)
|
.margin_start(MARGIN_LEFT / 2)
|
||||||
|
.margin_end(MARGIN_RIGHT / 2)
|
||||||
.draw_value(true)
|
.draw_value(true)
|
||||||
.inverted(true)
|
.inverted(true)
|
||||||
.round_digits(0)
|
.round_digits(0)
|
||||||
.digits(0)
|
.digits(0)
|
||||||
//(|x| eprintln!("Changed! {:?}", x))
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
let seperator = Separator::new(Orientation::Vertical);
|
||||||
let content = Box::builder()
|
let content = Box::builder()
|
||||||
//.hexpand(true)
|
//.hexpand(true)
|
||||||
.orientation(Orientation::Horizontal)
|
.orientation(Orientation::Horizontal)
|
||||||
@@ -59,6 +67,7 @@ fn main() {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
content.append(&scale);
|
content.append(&scale);
|
||||||
|
content.append(&seperator);
|
||||||
content.append(&image);
|
content.append(&image);
|
||||||
|
|
||||||
scale.connect_value_changed(move |x| {
|
scale.connect_value_changed(move |x| {
|
||||||
|
|||||||
Reference in New Issue
Block a user