Skip to content

Commit

Permalink
Update style.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jul 12, 2024
1 parent 050dcba commit 04097d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/egui/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,9 @@ pub struct TextCursorStyle {

/// When blinking, this is how long the cursor is invisible.
pub off_duration: f32,

/// Indicates whether the IME is visible.
pub ime_visible: bool,
}

impl Default for TextCursorStyle {
Expand All @@ -761,6 +764,7 @@ impl Default for TextCursorStyle {
blink: true,
on_duration: 0.5,
off_duration: 0.5,
ime_visible: false,
}
}
}
Expand Down Expand Up @@ -2038,6 +2042,7 @@ impl TextCursorStyle {
blink,
on_duration,
off_duration,
ime_visible,
} = self;

ui.horizontal(|ui| {
Expand Down Expand Up @@ -2070,6 +2075,8 @@ impl TextCursorStyle {
ui.end_row();
});
}

ui.checkbox(ime_visible, "Whether the IME should be visible");
}
}

Expand Down

0 comments on commit 04097d5

Please sign in to comment.