Skip to content

Commit e6a8601

Browse files
kekrbyWhatAmISupposedToPutHere
authored andcommitted
Increase the button height
1 parent b62b429 commit e6a8601

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl Button {
7474
},
7575
ButtonImage::Svg(svg) => {
7676
let renderer = CairoRenderer::new(&svg);
77-
let y = 0.18 * DFR_HEIGHT as f64;
77+
let y = 0.12 * DFR_HEIGHT as f64;
7878
let size = DFR_HEIGHT as f64 - y * 2.0;
7979
let x = left_edge + button_width / 2.0 - size / 2.0;
8080
renderer.render_document(c,
@@ -97,8 +97,8 @@ impl FunctionLayer {
9797
let button_width = DFR_WIDTH as f64 / (self.buttons.len() + 1) as f64;
9898
let spacing_width = (DFR_WIDTH as f64 - self.buttons.len() as f64 * button_width) / (self.buttons.len() - 1) as f64;
9999
let radius = 8.0f64;
100-
let bot = 0.09 * DFR_HEIGHT as f64 + radius;
101-
let top = bot + 0.82 * DFR_HEIGHT as f64 - 2.0 * radius;
100+
let bot = (DFR_HEIGHT as f64) * 0.2;
101+
let top = (DFR_HEIGHT as f64) * 0.85;
102102
c.set_source_rgb(0.0, 0.0, 0.0);
103103
c.paint().unwrap();
104104
c.select_font_face("sans-serif", FontSlant::Normal, FontWeight::Bold);
@@ -175,7 +175,7 @@ fn button_hit(num: u32, idx: u32, x: f64, y: f64) -> bool {
175175
if x < left_edge || x > (left_edge + button_width) {
176176
return false
177177
}
178-
y > 0.09 * DFR_HEIGHT as f64 && y < 0.91 * DFR_HEIGHT as f64
178+
y > 0.1 * DFR_HEIGHT as f64 && y < 0.9 * DFR_HEIGHT as f64
179179
}
180180

181181
fn emit<F>(uinput: &mut UInputHandle<F>, ty: EventKind, code: u16, value: i32) where F: AsRawFd {

0 commit comments

Comments
 (0)