Skip to content

Commit

Permalink
Use egui from crates.io
Browse files Browse the repository at this point in the history
  • Loading branch information
Barugon committed Apr 7, 2023
1 parent 891637a commit e9baccc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ version = "5.2.0"
chrono = {version = "0.4", features = ["serde"]}
clipboard = "0.5"
dirs = "4.0"
eframe = {path = "../egui/crates/eframe", features = ["persistence"]}
egui_extras = {path = "../egui/crates/egui_extras", features = ["image", "datepicker"]}
egui_file = {path = "../egui_file"}
eframe = {version = "0.21", features = ["persistence"]}
egui_extras = {version = "0.21", features = ["image", "datepicker"]}
egui_file = "0.8"
futures = {version = "0.3", features = ["thread-pool"]}
image = {version = "0.24", features = ["png"]}
notify-rust = "4"
Expand Down
7 changes: 2 additions & 5 deletions src/experience.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ use crate::{
};
use clipboard::{ClipboardContext, ClipboardProvider};
use eframe::{
egui::{
scroll_area::ScrollBarVisibility, ComboBox, Context, DragValue, Label, Layout, RichText,
ScrollArea, Sense, Ui, Widget,
},
egui::{ComboBox, Context, DragValue, Label, Layout, RichText, ScrollArea, Sense, Ui, Widget},
emath::{Align, Vec2},
epaint::Color32,
Storage,
Expand Down Expand Up @@ -149,7 +146,7 @@ impl Experience {
ui.add_enabled_ui(!self.avatar.is_empty(), |ui| {
ScrollArea::vertical()
.id_source(scroll_id)
.scroll_bar_visibility(ScrollBarVisibility::AlwaysVisible)
.always_show_scroll(true)
.show(ui, |ui| {
for skill_group in groups {
// Use a single column in order to force the scroll area to fill the entire available width.
Expand Down
7 changes: 2 additions & 5 deletions src/log_dlg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ use crate::{
util::{self, AppState, Cancel, Search, NONE_ERR},
};
use eframe::{
egui::{
scroll_area::ScrollBarVisibility, Context, Key, RichText, ScrollArea, TextEdit, TextFormat, Ui,
Window,
},
egui::{Context, Key, RichText, ScrollArea, TextEdit, TextFormat, Ui, Window},
emath::Align2,
epaint::{
text::{LayoutJob, LayoutSection},
Expand Down Expand Up @@ -69,7 +66,7 @@ impl LogDlg {
ScrollArea::vertical()
}
.max_height(available.height() * 0.75)
.scroll_bar_visibility(ScrollBarVisibility::AlwaysVisible)
.always_show_scroll(true)
.show(ui, |ui| {
ui.add_sized(
ui.available_size(),
Expand Down
5 changes: 2 additions & 3 deletions src/notes_dlg.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::util::AppState;
use eframe::{
egui::{
scroll_area::ScrollBarVisibility, text::CCursor, text_edit::CCursorRange, Context, Key,
RichText, ScrollArea, TextEdit, Window,
text::CCursor, text_edit::CCursorRange, Context, Key, RichText, ScrollArea, TextEdit, Window,
},
emath::Align2,
};
Expand Down Expand Up @@ -50,7 +49,7 @@ impl NotesDlg {
ScrollArea::vertical()
}
.max_height(available.height() * 0.5)
.scroll_bar_visibility(ScrollBarVisibility::AlwaysVisible)
.always_show_scroll(true)
.show(ui, |ui| {
let response = ui.add_sized(
ui.available_size(),
Expand Down
7 changes: 2 additions & 5 deletions src/offline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,7 @@ mod game_info {
util::{button_size, NONE_ERR},
};
use eframe::{
egui::{
scroll_area::ScrollBarVisibility, CollapsingHeader, DragValue, Layout, RichText, ScrollArea,
Ui,
},
egui::{CollapsingHeader, DragValue, Layout, RichText, ScrollArea, Ui},
emath::{Align, Vec2},
epaint::Color32,
};
Expand Down Expand Up @@ -405,7 +402,7 @@ mod game_info {
ui.vertical(|ui| {
ScrollArea::vertical()
.id_source(scroll_id)
.scroll_bar_visibility(ScrollBarVisibility::AlwaysVisible)
.always_show_scroll(true)
.show(ui, |ui| {
for skill_group in groups {
// Use a single column in order to force the scroll area to fill the entire available width.
Expand Down

0 comments on commit e9baccc

Please sign in to comment.