Skip to content

Commit

Permalink
Better panels
Browse files Browse the repository at this point in the history
  • Loading branch information
divanvisagie committed Jan 29, 2022
1 parent 6198bfb commit bc2dc7e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arcanaeum"
version = "0.1.5"
version = "0.2.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
Binary file modified docs/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::{HashMap, HashSet};

use eframe::egui;
use eframe::egui::Color32;
use eframe::egui::{self};
use eframe::epi;

use crate::{
Expand All @@ -24,7 +24,7 @@ pub struct AppState {

impl epi::App for AppState {
fn update(&mut self, ctx: &egui::CtxRef, _frame: &epi::Frame) {
egui::CentralPanel::default().show(ctx, |ui| {
egui::TopBottomPanel::top("top-panel").show(ctx, |ui| {
if ui.button("Browse to file").clicked() {
let res = rfd::FileDialog::new()
.add_filter("Elder Scrolls Save", &["ess"])
Expand Down Expand Up @@ -59,6 +59,8 @@ impl epi::App for AppState {
if let Some(e) = &self.error {
ui.colored_label(Color32::from_rgb(200, 50, 50), e);
}
});
egui::CentralPanel::default().show(ctx, |ui| {
egui::ScrollArea::vertical().show(ui, |ui| {
egui::Grid::new("values")
.striped(true)
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ fn main() {
};
let mut window_options = eframe::NativeOptions::default();
window_options.initial_window_size = Some(egui::Vec2::new(800., 768.));
window_options.resizable = true;
window_options.decorated = true;
eframe::run_native(Box::new(app_state), window_options);
}

0 comments on commit bc2dc7e

Please sign in to comment.