Skip to content

Commit

Permalink
fix alignment issues
Browse files Browse the repository at this point in the history
  • Loading branch information
x86y committed Mar 18, 2024
1 parent ce89c90 commit 86ce185
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
mv target/x86_64-pc-windows-gnu/release/dynasty.exe ./dynasty_x86_64-pc-windows-gnu.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dynasty_x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -79,7 +78,6 @@ jobs:
./create-dmg/create-dmg Dynasty_x86_64-apple-darwin.dmg target/release/bundle/osx/Dynasty.app
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Dynasty_aarch64-apple-darwin.dmg
Expand Down
8 changes: 6 additions & 2 deletions src/views/panes/book.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,14 @@ pub fn book_view(
.next_back()
.unwrap_or((&String::new(), &0.0))
.0
)),
))
.font(iced::Font {
weight: iced::font::Weight::Bold,
..Default::default()
}),
bid_rows,
]
.padding(12)
.padding([2, 12])
.spacing(10)
.max_width(500);

Expand Down
23 changes: 12 additions & 11 deletions src/views/panes/trades.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::VecDeque;

use binance::ws_model::TradesEvent;
use iced::{
widget::{column, container, row, scrollable, Column, Space},
widget::{column, container, row, scrollable, Column},
Color, Element, Length,
};

Expand All @@ -13,11 +13,9 @@ use super::orders::{t, tb};
pub fn trades_view(bs: &VecDeque<TradesEvent>) -> Element<'_, Message> {
column![
row![
tb("Price"),
Space::new(Length::Fill, 1.0),
tb("Amount"),
Space::new(Length::Fill, 1.0),
tb("Time")
tb("Price").width(Length::Fill),
tb("Amount").width(Length::Fill),
tb("Time").width(Length::Fill)
],
scrollable(Column::with_children(
bs.iter()
Expand All @@ -28,18 +26,21 @@ pub fn trades_view(bs: &VecDeque<TradesEvent>) -> Element<'_, Message> {
Color::from_rgb(0.0, 1.0, 0.0)
};
container(row![
t(format!("{:.2}", b.price.parse::<f32>().unwrap())).style(c),
Space::new(Length::Fill, 1.0),
t(format!("{:.2}", b.price.parse::<f32>().unwrap()))
.style(c)
.width(Length::Fill),
t(format!("{:.2} ", b.qty.parse::<f32>().unwrap()))
.width(Length::Fill)
.style(h2c("B7BDB7").unwrap()),
Space::new(Length::Fill, 1.0),
t(b.trade_order_time).style(h2c("B7BDB7").unwrap()),
t(b.trade_order_time)
.style(h2c("B7BDB7").unwrap())
.width(Length::Fill),
])
.width(Length::Fill)
})
.map(Element::from),
)) // .style(ScrollbarStyle::theme())
]
.padding([2, 12])
.padding([2, 4])
.into()
}

0 comments on commit 86ce185

Please sign in to comment.