mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Add Zoom Factor to options panel (#7517)
This commit is contained in:
@@ -4,8 +4,9 @@ use egui::{
|
||||
};
|
||||
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq)]
|
||||
enum ScrollDemo {
|
||||
#[default]
|
||||
ScrollAppearance,
|
||||
ScrollTo,
|
||||
ManyLines,
|
||||
@@ -14,12 +15,6 @@ enum ScrollDemo {
|
||||
Bidirectional,
|
||||
}
|
||||
|
||||
impl Default for ScrollDemo {
|
||||
fn default() -> Self {
|
||||
Self::ScrollAppearance
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
#[cfg_attr(feature = "serde", serde(default))]
|
||||
#[derive(Default, PartialEq)]
|
||||
|
||||
@@ -108,7 +108,7 @@ pub fn highlight_easymark(egui_style: &egui::Style, mut text: &str) -> egui::tex
|
||||
// Swallow everything up to the next special character:
|
||||
let line_end = text[skip..]
|
||||
.find('\n')
|
||||
.map_or_else(|| text.len(), |i| (skip + i + 1));
|
||||
.map_or_else(|| text.len(), |i| skip + i + 1);
|
||||
let end = text[skip..]
|
||||
.find(&['*', '`', '~', '_', '/', '$', '^', '\\', '<', '['][..])
|
||||
.map_or_else(|| text.len(), |i| (skip + i).max(1));
|
||||
|
||||
Reference in New Issue
Block a user