Skip to content

Commit

Permalink
Merge pull request #617 from Stoppedpuma/spell-check
Browse files Browse the repository at this point in the history
UI spell checking and rewording
  • Loading branch information
Stoppedpuma authored Jan 15, 2025
2 parents d7cddd0 + 5551e26 commit d3e556b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/ui/edit_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub fn edit_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, gfx: &mu
egui::Grid::new("paint").show(ui, |ui| {
ui.label("📜 Keep history");
ui.styled_checkbox(&mut state.edit_state.non_destructive_painting, "")
.on_hover_text("Keeps all paint history and edit it. Slower.");
.on_hover_text("Keeps all paint history and allows edits to it. Slower.");
ui.end_row();

if let Some(stroke) = state.edit_state.paint_strokes.last_mut() {
Expand Down Expand Up @@ -473,7 +473,7 @@ pub fn edit_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, gfx: &mu
_ = save_with_encoding(&state.edit_state.result_pixel_op, p, &state.image_info, &state.volatile_settings.encoding_options).map(|_| state.send_message_info("Saved")).map_err(|e| state.send_message_err(&format!("Error: {e}")));
}, "overwrite");

if ui.button(text).on_hover_text("Saves the image. This will create a new file or overwrite.").clicked() {
if ui.button(text).on_hover_text("Saves the image. This will create a new file or overwrite an existing one.").clicked() {
if p.exists() {
modal.open();
} else {
Expand All @@ -486,7 +486,7 @@ pub fn edit_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, gfx: &mu
_ = serde_json::to_writer_pretty(&f, &state.edit_state);
}
}
if ui.button(format!("Save directory edits")).on_hover_text("Saves an .oculante metafile in the same directory as the image. This file will contain all edits and will be restored automatically if you open the image again. This leaves the original image unmodified and allows you to continue editing later.").clicked() {
if ui.button(format!("Save directory edits")).on_hover_text("Saves an .oculante metafile in the same directory as all applicable images. This file will contain all edits and will be restored automatically if you open the image(s) again. This leaves the original image(s) unmodified and allows you to continue editing later.").clicked() {
if let Some(parent) = p.parent() {
if let Ok(f) = std::fs::File::create(parent.join(".oculante")) {
_ = serde_json::to_writer_pretty(&f, &state.edit_state);
Expand Down Expand Up @@ -660,7 +660,7 @@ fn stroke_ui(

let r = ui
.styled_checkbox(&mut stroke.flip_random, "")
.on_hover_text("Flip brush in X any Y randomly to make stroke less uniform");
.on_hover_text("Flip brush X and Y randomly to make stroke less uniform");
if r.changed() {
combined_response.changed = true;
}
Expand Down
24 changes: 12 additions & 12 deletions src/ui/settings_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
}
}, ui);

configuration_item_ui("Fit image on window resize", "When you resize the main window, do you want to fit the image with it?", |ui| {
configuration_item_ui("Fit image on window resize", "Fits the image to the window while resizing.", |ui| {
ui.styled_checkbox(&mut state.persistent_settings.fit_image_on_window_resize, "");
}, ui);

configuration_item_ui("Zoom multiplier", "Multiplier of zoom when you use the mouse wheel or the trackpad.", |ui| {
configuration_item_ui("Zoom multiplier", "Multiplier of how fast the image will change size when using your mouse wheel or trackpad.", |ui| {
ui.add(egui::DragValue::new(&mut state.persistent_settings.zoom_multiplier).clamp_range(0.05..=10.0).speed(0.01));
}, ui);

#[cfg(not(any(target_os = "netbsd", target_os = "freebsd")))]
configuration_item_ui("Borderless mode", "Don't draw OS window decorations. A restart is required to take effect.", |ui| {
configuration_item_ui("Borderless mode", "Prevents drawing OS window decorations. A restart is required to take effect.", |ui| {
ui.styled_checkbox(&mut state.persistent_settings.borderless, "");
}, ui);

Expand All @@ -145,7 +145,7 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
}, ui);

#[cfg(feature = "update")]
configuration_item_ui("Check for updates", "Check and install the latest update if available. A restart is required to use a newly installed version.", |ui| {
configuration_item_ui("Check for updates", "Check for updates and install the latest update if available. A restart is required to use a newly installed version.", |ui| {
if ui.button("Check").clicked() {
state.send_message_info("Checking for updates...");
crate::update::update(Some(state.message_channel.0.clone()));
Expand All @@ -159,7 +159,7 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
}
}, ui);

configuration_item_ui("Reset all settings", "Reset Oculante to default", |ui| {
configuration_item_ui("Reset all settings", "Reset Oculante to default settings.", |ui| {
if ui.button("Reset").clicked() {
state.persistent_settings = Default::default();
apply_theme(state, ctx);
Expand All @@ -174,7 +174,7 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
visual.scroll_to_me(Some(Align::TOP));
}
light_panel(ui, |ui| {
configuration_item_ui("Color theme", "Customize look and feel", |ui| {
configuration_item_ui("Color theme", "Customize the look and feel.", |ui| {
egui::ComboBox::from_id_source("Color theme")
.selected_text(format!("{:?}", state.persistent_settings.theme))
.show_ui(ui, |ui| {
Expand All @@ -192,7 +192,7 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
});
}, ui);

configuration_item_ui("Accent color", "Customize the primary color used in the UI", |ui| {
configuration_item_ui("Accent color", "Customize the primary color used in the UI.", |ui| {
if ui
.color_edit_button_srgb(&mut state.persistent_settings.accent_color)
.changed()
Expand All @@ -210,15 +210,15 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
// }
// }, ui);

configuration_item_ui("Background color", "The color used as a background for images", |ui| {
configuration_item_ui("Background color", "The color used as a background for images.", |ui| {
ui.color_edit_button_srgb(&mut state.persistent_settings.background_color);
}, ui);

configuration_item_ui("Transparency Grid", "Replaces image transparency with a checker background.", |ui| {
ui.styled_checkbox(&mut state.persistent_settings.show_checker_background, "");
}, ui);

configuration_item_ui("Draw frame around image", "Draw a small frame around the image. It is centered on the outmost pixel. This can be helpful on images with lots of transparency.", |ui| {
configuration_item_ui("Draw frame around image", "Draws a frame around images which can help see its edges when there are many transparent areas. It is centered on the outmost pixel.", |ui| {
ui
.styled_checkbox(&mut state.persistent_settings.show_frame, "");
}, ui);
Expand Down Expand Up @@ -248,7 +248,7 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
if ui
.text_edit_singleline(&mut state.persistent_settings.title_format)
.on_hover_text(
"Configures the window title. Valid options are: {APP}, {VERSION}, {FULLPATH}, {FILENAME}, and {RES}",
"Configures the window title. Valid options are: {APP}, {VERSION}, {FULLPATH}, {FILENAME}, and {RES}.",
)
.changed()
{
Expand All @@ -273,7 +273,7 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
}
light_panel(ui, |ui| {
#[cfg(debug_assertions)]
configuration_item_ui("Send test message", "Send some messages", |ui| {
configuration_item_ui("Send test message", "Send some messages.", |ui| {
if ui.button("Info").clicked() {
state.send_message_info("Test");
}
Expand All @@ -285,7 +285,7 @@ pub fn settings_ui(app: &mut App, ctx: &Context, state: &mut OculanteState, _gfx
}
}, ui);

configuration_item_ui("Enable experimental features", "Turn on features that are not yet finished", |ui| {
configuration_item_ui("Enable experimental features", "Turn on features that are not yet finished.", |ui| {
ui.styled_checkbox(&mut state.persistent_settings.experimental_features, "");
}, ui);
});
Expand Down

0 comments on commit d3e556b

Please sign in to comment.