Skip to content

Commit

Permalink
Update coordinate pane layout padding and spacers (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliheuer authored Jul 5, 2021
1 parent 74402f5 commit 08959b5
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions runebender-lib/src/widgets/coord_pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ fn build_widget() -> impl Widget<CoordinateSelection> {
.with_child(
Label::new("x")
.with_font(coord_label_font.clone())
.with_text_color(theme::SECONDARY_TEXT_COLOR),
.with_text_color(theme::SECONDARY_TEXT_COLOR)
.padding((0.0, 0.0, 0.0, 8.0)),
)
.with_child(
EditableLabel::parse()
.with_font(theme::UI_DETAIL_FONT)
.lens(point_x_lens)
.fix_width(40.0),
.fix_width(40.0)
.padding((0.0, 0.0, 0.0, 8.0)),
),
)
.with_child(
Expand Down Expand Up @@ -167,14 +169,16 @@ fn build_widget() -> impl Widget<CoordinateSelection> {
.with_child(
Label::new("w")
.with_font(coord_label_font.clone())
.with_text_color(theme::SECONDARY_TEXT_COLOR),
.with_text_color(theme::SECONDARY_TEXT_COLOR)
.padding((-0.0, 0.0, 0.0, 8.0)),
)
.with_spacer(4.0)
.with_spacer(0.0)
.with_child(
EditableLabel::parse()
.with_font(theme::UI_DETAIL_FONT)
.lens(size_width_lens)
.fix_width(40.0),
.fix_width(40.0)
.padding((0.0, 0.0, 0.0, 8.0)),
),
)
.with_child(
Expand All @@ -184,7 +188,7 @@ fn build_widget() -> impl Widget<CoordinateSelection> {
.with_font(coord_label_font)
.with_text_color(theme::SECONDARY_TEXT_COLOR),
)
.with_spacer(4.0)
.with_spacer(0.0)
.with_child(
EditableLabel::parse()
.with_font(theme::UI_DETAIL_FONT)
Expand All @@ -200,7 +204,7 @@ fn build_widget() -> impl Widget<CoordinateSelection> {
.with_child(coord_picker)
.with_child(coord_editor)
.with_child(bbox_info)
.padding(4.0);
.padding(8.0);

// if we have any points selected, show the numerical adjust widget, else an empty widget
Either::new(|d, _| d.count != 0, picker_and_editor, SizedBox::empty())
Expand Down

0 comments on commit 08959b5

Please sign in to comment.