Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ A comprehensive configuration file is generated when you run this app at the fir
| `workflows` | Sequences of primitive actions for specific UI roles | `[Default Workflows]` |
| `scroll_distance` | Relative distance to scroll when using scroll actions | `0.05` |
| `hide_scrolling_menu` | Whether to hide the menu when scrolling | `false` |
| `hide_covered_elements` | Whether to hide invisible/covered elements when there's overlapping detected. (Press ⌫ to redraw false positives) | `true` |
| `element_min_width` | Minimum width for UI elements to be considered | `15` |
| `element_min_height` | Minimum height for UI elements to be considered | `15` |
| `image_min_size` | Minimum size (width/height) for images | `20` |
Expand Down
4 changes: 3 additions & 1 deletion src/app_engine/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ impl AppEngine {
let need_help_msg = target == Target::ChildElement && self.selected.is_none();

if !self.hint_boxes.is_empty() {
if matches!(target, Target::Clickable | Target::Text) {
if self.config.hide_covered_elements
&& matches!(target, Target::Clickable | Target::Text)
{
self.resolve_overlapping();
}
resolve_collisions(&mut self.hint_boxes, self.hint_width, &self.config.theme);
Expand Down
6 changes: 6 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ pub struct GlyphlowConfig {
pub scroll_distance: f64,
#[serde(default = "default_hide_scrolling_menu")]
pub hide_scrolling_menu: bool,
#[serde(default = "default_hide_covered_elements")]
pub hide_covered_elements: bool,
#[serde(default = "default_element_min_width")]
pub element_min_width: u16,
#[serde(default = "default_element_min_height")]
Expand Down Expand Up @@ -571,6 +573,9 @@ fn default_scroll_distance() -> f64 {
fn default_hide_scrolling_menu() -> bool {
false
}
fn default_hide_covered_elements() -> bool {
true
}
fn default_element_min_width() -> u16 {
15
}
Expand Down Expand Up @@ -606,6 +611,7 @@ impl Default for GlyphlowConfig {
workflows: default_workflows(),
scroll_distance: default_scroll_distance(),
hide_scrolling_menu: default_hide_scrolling_menu(),
hide_covered_elements: default_hide_covered_elements(),
element_min_width: default_element_min_width(),
element_min_height: default_element_min_height(),
image_min_size: default_image_min_size(),
Expand Down
Loading