main: reduce top/bottom bar size

This should generally help some spacing issues with the UI and
prevent the [Status/P2Pool] square from expanding out.
This commit is contained in:
hinto-janaiyo 2023-01-22 21:30:02 -05:00
parent 94839a0943
commit 786b300623
No known key found for this signature in database
GPG key ID: B1C5A64B80691E45
2 changed files with 4 additions and 4 deletions

View file

@ -74,8 +74,8 @@ Every frame, the max available `[width, height]` are calculated, and those are u
``` ```
Main [App] outer frame (default: [1280.0, 960.0], 4:3 aspect ratio) Main [App] outer frame (default: [1280.0, 960.0], 4:3 aspect ratio)
├─ TopPanel = height: 1/12th ├─ TopPanel = height: 1/14
├─ BottomPanel = height: 1/20th ├─ BottomPanel = height: 1/22
├─ CentralPanel = height: the rest ├─ CentralPanel = height: the rest
``` ```

View file

@ -1393,7 +1393,7 @@ impl eframe::App for App {
debug!("App | Rendering TOP tabs"); debug!("App | Rendering TOP tabs");
TopBottomPanel::top("top").show(ctx, |ui| { TopBottomPanel::top("top").show(ctx, |ui| {
let width = (self.width - (SPACE*10.0))/5.0; let width = (self.width - (SPACE*10.0))/5.0;
let height = self.height/12.0; let height = self.height/15.0;
ui.add_space(4.0); ui.add_space(4.0);
ui.horizontal(|ui| { ui.horizontal(|ui| {
let style = ui.style_mut(); let style = ui.style_mut();
@ -1417,7 +1417,7 @@ impl eframe::App for App {
// Bottom: app info + state/process buttons // Bottom: app info + state/process buttons
debug!("App | Rendering BOTTOM bar"); debug!("App | Rendering BOTTOM bar");
TopBottomPanel::bottom("bottom").show(ctx, |ui| { TopBottomPanel::bottom("bottom").show(ctx, |ui| {
let height = self.height/20.0; let height = self.height/22.0;
ui.style_mut().override_text_style = Some(Name("Bottom".into())); ui.style_mut().override_text_style = Some(Name("Bottom".into()));
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.group(|ui| { ui.group(|ui| {