Revert "Update egui"

This reverts commit c8a0503f33.
This commit is contained in:
Mike Dilger 2023-09-12 07:20:46 +12:00
parent cf8a53e002
commit aeac78873b
7 changed files with 31 additions and 48 deletions

37
Cargo.lock generated
View File

@ -399,6 +399,12 @@ version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3"
[[package]]
name = "atomic_refcell"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79d6dc922a2792b006573f60b2648076355daeae5ce9cb59507e5908c9625d31"
[[package]]
name = "atspi"
version = "0.10.1"
@ -1185,7 +1191,7 @@ dependencies = [
[[package]]
name = "ecolor"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"bytemuck",
"serde",
@ -1194,7 +1200,7 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"bytemuck",
"cocoa",
@ -1209,7 +1215,6 @@ dependencies = [
"js-sys",
"log",
"objc",
"parking_lot",
"percent-encoding",
"raw-window-handle",
"ron",
@ -1226,7 +1231,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"accesskit",
"ahash 0.8.3",
@ -1257,16 +1262,16 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"accesskit_winit",
"arboard",
"egui",
"instant",
"log",
"raw-window-handle",
"serde",
"smithay-clipboard",
"web-time",
"webbrowser",
"winit",
]
@ -1274,7 +1279,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"egui",
"image",
@ -1287,7 +1292,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"bytemuck",
"egui",
@ -1307,7 +1312,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "emath"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"bytemuck",
"serde",
@ -1357,10 +1362,11 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.22.0"
source = "git+https://github.com/mikedilger/egui?rev=3a1ed27b4782bfb93afb057acc1a6a85932632b6#3a1ed27b4782bfb93afb057acc1a6a85932632b6"
source = "git+https://github.com/mikedilger/egui?rev=538088439c7c507fe49c730eab84ddd85e147391#538088439c7c507fe49c730eab84ddd85e147391"
dependencies = [
"ab_glyph",
"ahash 0.8.3",
"atomic_refcell",
"bytemuck",
"ecolor",
"emath",
@ -4816,17 +4822,6 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "web-time"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19353897b48e2c4d849a2d73cb0aeb16dc2be4e00c565abfc11eb65a806e47de"
dependencies = [
"js-sys",
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "webbrowser"
version = "0.8.10"

View File

@ -19,7 +19,7 @@ rustls-tls = [ "reqwest/rustls-tls", "tungstenite/rustls-tls-webpki-roots", "tok
[patch.crates-io]
# override egui crate for egui_video dependency
egui = { git = "https://github.com/mikedilger/egui", rev = "3a1ed27b4782bfb93afb057acc1a6a85932632b6" }
egui = { git = "https://github.com/mikedilger/egui", rev = "538088439c7c507fe49c730eab84ddd85e147391" }
# Use the master branch of SDL2 to include a fix related to clang (and XCode after 14.2)
sdl2 = { git = "https://github.com/Rust-SDL2/rust-sdl2", rev = "27cd1fd67c811e06b9d997a77bb6089a1b65070d" }
@ -29,9 +29,9 @@ async-trait = "0.1"
base64 = "0.21"
dashmap = "5.4"
dirs = "5.0"
eframe = { git = "https://github.com/mikedilger/egui", rev = "3a1ed27b4782bfb93afb057acc1a6a85932632b6", features = [ "persistence" ] }
egui-winit = { git = "https://github.com/mikedilger/egui", rev = "3a1ed27b4782bfb93afb057acc1a6a85932632b6", features = [ "default" ] }
egui_extras = { git = "https://github.com/mikedilger/egui", rev = "3a1ed27b4782bfb93afb057acc1a6a85932632b6", features = [ "image", "svg" ] }
eframe = { git = "https://github.com/mikedilger/egui", rev = "538088439c7c507fe49c730eab84ddd85e147391", features = [ "persistence" ] }
egui-winit = { git = "https://github.com/mikedilger/egui", rev = "538088439c7c507fe49c730eab84ddd85e147391", features = [ "default" ] }
egui_extras = { git = "https://github.com/mikedilger/egui", rev = "538088439c7c507fe49c730eab84ddd85e147391", features = [ "image", "svg" ] }
egui-video = { git = "https://github.com/mikedilger/egui-video", rev = "5a7297138dce16425c7dc7a8eab4d39d79088aba", features = [ "from_bytes" ], optional = true }
encoding_rs = "0.8"
fallible-iterator = "0.2"

View File

@ -474,9 +474,7 @@ impl GossipUi {
let pixels = image_buffer.as_flat_samples();
cctx.egui_ctx.load_texture(
"icon",
ImageData::Color(
ColorImage::from_rgba_unmultiplied(size, pixels.as_slice()).into(),
),
ImageData::Color(ColorImage::from_rgba_unmultiplied(size, pixels.as_slice())),
TextureOptions::default(), // magnification, minification
)
};
@ -489,9 +487,7 @@ impl GossipUi {
let pixels = image_buffer.as_flat_samples();
cctx.egui_ctx.load_texture(
"placeholder_avatar",
ImageData::Color(
ColorImage::from_rgba_unmultiplied(size, pixels.as_slice()).into(),
),
ImageData::Color(ColorImage::from_rgba_unmultiplied(size, pixels.as_slice())),
TextureOptions::default(), // magnification, minification
)
};

View File

@ -179,12 +179,11 @@ impl ThemeDef for ClassicTheme {
striped: true,
window_rounding: Rounding::same(6.0),
resize_corner_size: 12.0,
text_cursor: Stroke::new(2.0, Color32::from_rgb(192, 222, 255)),
text_cursor_width: 2.0,
text_cursor_preview: false,
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
button_frame: true,
collapsing_header_frame: false,
interact_cursor: None,
};
} else {
style.visuals = Visuals {
@ -263,12 +262,11 @@ impl ThemeDef for ClassicTheme {
striped: true,
window_rounding: Rounding::same(6.0),
resize_corner_size: 12.0,
text_cursor: Stroke::new(2.0, Color32::from_rgb(0, 83, 125)),
text_cursor_width: 2.0,
text_cursor_preview: false,
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
button_frame: true,
collapsing_header_frame: false,
interact_cursor: None,
};
}
style
@ -457,7 +455,7 @@ impl ThemeDef for ClassicTheme {
// feed styling
fn feed_scroll_rounding(_feed: &FeedProperties) -> Rounding {
Rounding::ZERO
Rounding::none()
}
fn feed_scroll_fill(dark_mode: bool, _feed: &FeedProperties) -> Color32 {
if dark_mode {

View File

@ -179,12 +179,11 @@ impl ThemeDef for DefaultTheme {
striped: true,
window_rounding: Rounding::same(6.0),
resize_corner_size: 12.0,
text_cursor: Stroke::new(2.0, Color32::from_rgb(192, 222, 255)),
text_cursor_width: 2.0,
text_cursor_preview: false,
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
button_frame: true,
collapsing_header_frame: false,
interact_cursor: None,
};
} else {
style.visuals = Visuals {
@ -263,12 +262,11 @@ impl ThemeDef for DefaultTheme {
striped: true,
window_rounding: Rounding::same(6.0),
resize_corner_size: 12.0,
text_cursor: Stroke::new(2.0, Color32::from_rgb(0, 83, 125)),
text_cursor_width: 2.0,
text_cursor_preview: false,
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
button_frame: true,
collapsing_header_frame: false,
interact_cursor: None,
};
}
style
@ -474,7 +472,7 @@ impl ThemeDef for DefaultTheme {
// feed styling
fn feed_scroll_rounding(_feed: &FeedProperties) -> Rounding {
Rounding::ZERO
Rounding::none()
}
fn feed_scroll_fill(_dark_mode: bool, _feed: &FeedProperties) -> Color32 {
Color32::from_rgba_premultiplied(0, 0, 0, 0) // Transparent separator

View File

@ -184,12 +184,11 @@ impl ThemeDef for RoundyTheme {
striped: true,
window_rounding: Rounding::same(6.0),
resize_corner_size: 12.0,
text_cursor: Stroke::new(2.0, Color32::from_rgb(192, 222, 255)),
text_cursor_width: 2.0,
text_cursor_preview: false,
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
button_frame: true,
collapsing_header_frame: false,
interact_cursor: None,
};
} else {
// ---- light mode -----------------------------------------------------------------------------------------
@ -269,12 +268,11 @@ impl ThemeDef for RoundyTheme {
striped: true,
window_rounding: Rounding::same(6.0),
resize_corner_size: 12.0,
text_cursor: Stroke::new(2.0, Color32::from_rgb(0, 83, 125)),
text_cursor_width: 2.0,
text_cursor_preview: false,
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
button_frame: true,
collapsing_header_frame: false,
interact_cursor: None,
};
}
style
@ -494,7 +492,7 @@ impl ThemeDef for RoundyTheme {
}
fn feed_frame_rounding(post: &NoteRenderData) -> Rounding {
if post.is_thread {
let mut rounding = Rounding::ZERO;
let mut rounding = Rounding::none();
if post.is_first && post.thread_position == 0 {
rounding.nw = 7.0;
rounding.ne = 7.0;

View File

@ -45,8 +45,6 @@ pub(crate) fn paint_frame(ui: &mut Ui, rect: &Rect, fill: Option<Color32>) {
rounding: Rounding::same(5.0),
fill,
stroke: Stroke::NONE,
fill_texture_id: Default::default(),
uv: Rect::ZERO,
});
}