Skip to content

Commit

Permalink
Rename to messages
Browse files Browse the repository at this point in the history
  • Loading branch information
quietvoid committed Feb 28, 2022
1 parent ebbdfb1 commit 794d7c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/epi_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl epi::App for VSPreviewer {
self.add_error("preview", preview_res);

// Display errors if any
ErrorWindowUi::ui(self, ctx);
MessageWindowUi::ui(self, ctx);
});
}

Expand Down
8 changes: 4 additions & 4 deletions src/app/ui/error_window.rs → src/app/ui/message_window.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::{egui, VSPreviewer};
use eframe::egui::{RichText, Ui};

pub struct ErrorWindowUi {}
pub struct MessageWindowUi {}

impl ErrorWindowUi {
impl MessageWindowUi {
pub fn ui(pv: &mut VSPreviewer, ctx: &egui::Context) {
let mut vs_messages = None;

Expand All @@ -27,7 +27,7 @@ impl ErrorWindowUi {
}

if !pv.errors.is_empty() {
egui::Window::new(RichText::new("Some errors occurred!").size(20.0))
egui::Window::new(RichText::new("Messages").size(20.0))
.resizable(true)
.collapsible(false)
.default_pos((pv.available_size.x / 2.0, pv.available_size.y / 2.0))
Expand All @@ -52,7 +52,7 @@ impl ErrorWindowUi {

ui.vertical_centered(|ui| {
if ui
.button(RichText::new("Okay, clear errors").size(22.0))
.button(RichText::new("Okay, clear messages").size(22.0))
.on_hover_text(
RichText::new("The previewer may not end up in a useable state!")
.size(18.0),
Expand Down
4 changes: 2 additions & 2 deletions src/app/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use eframe::{egui, epaint, epi};

mod bottom_panel;
mod controls;
mod error_window;
mod frame_props;
mod message_window;
mod preferences;
mod preview_image;
mod state_window;
Expand All @@ -14,8 +14,8 @@ mod custom_widgets;

pub use bottom_panel::UiBottomPanel;
use controls::UiControls;
pub use error_window::ErrorWindowUi;
use frame_props::UiFrameProps;
pub use message_window::MessageWindowUi;
use preferences::UiPreferences;
pub use preview_image::UiPreviewImage;
pub use state_window::UiStateWindow;
Expand Down

0 comments on commit 794d7c1

Please sign in to comment.