android changes taken from ibaryshnikov
This commit is contained in:
parent
50cc94d944
commit
a6f4b5ac0a
7 changed files with 130 additions and 31 deletions
|
|
@ -88,6 +88,10 @@ pub enum Action {
|
|||
/// The amount of lines to scroll.
|
||||
lines: i32,
|
||||
},
|
||||
/// Editor gained focus
|
||||
Focus,
|
||||
/// Editor lost focus
|
||||
Blur,
|
||||
}
|
||||
|
||||
impl Action {
|
||||
|
|
|
|||
|
|
@ -164,25 +164,6 @@ impl Theme {
|
|||
|
||||
impl Default for Theme {
|
||||
fn default() -> Self {
|
||||
#[cfg(feature = "auto-detect-theme")]
|
||||
{
|
||||
use std::sync::LazyLock;
|
||||
|
||||
static DEFAULT: LazyLock<Theme> = LazyLock::new(|| {
|
||||
match dark_light::detect()
|
||||
.unwrap_or(dark_light::Mode::Unspecified)
|
||||
{
|
||||
dark_light::Mode::Dark => Theme::Dark,
|
||||
dark_light::Mode::Light | dark_light::Mode::Unspecified => {
|
||||
Theme::Light
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
DEFAULT.clone()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "auto-detect-theme"))]
|
||||
Theme::Light
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue