Merge bump to 0.31.1
commit 2d801408b2
Author: William Casarin <jb55@jb55.com>
Date: Mon Mar 17 18:05:01 2025 -0700
egui: bump to 0.31.1
This commit is contained in:
1036
Cargo.lock
generated
1036
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
40
Cargo.toml
40
Cargo.toml
@@ -16,13 +16,14 @@ rmpv = "1.3.0"
|
||||
bech32 = { version = "0.11", default-features = false }
|
||||
bitflags = "2.5.0"
|
||||
dirs = "5.0.1"
|
||||
eframe = { version = "0.30.0", default-features = false, features = [ "wgpu", "wayland", "x11", "android-game-activity" ] }
|
||||
egui = { version = "0.30.0", features = ["serde"] }
|
||||
egui_extras = { version = "0.30.0", features = ["all_loaders"] }
|
||||
egui-winit = { version = "0.30.0", features = ["android-game-activity"] }
|
||||
egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "eb297a0fefd9047352102346625a2eba93a1aa04" }
|
||||
egui_tabs = { git = "https://github.com/damus-io/egui-tabs", rev = "5d0bacc6ce2c645fe8a77723d2beb0f85b8148ee" }
|
||||
egui_virtual_list = "0.6.0"
|
||||
eframe = { version = "0.31.1", default-features = false, features = [ "wgpu", "wayland", "x11", "android-game-activity" ] }
|
||||
egui = { version = "0.31.1", features = ["serde"] }
|
||||
egui_extras = { version = "0.31.1", features = ["all_loaders"] }
|
||||
egui-winit = { version = "0.31.1", features = ["android-game-activity"] }
|
||||
egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "5e816ac95e20f31dbb243a0d76179eab329a8ac0" }
|
||||
egui_tabs = { git = "https://github.com/damus-io/egui-tabs", rev = "881d86bdf8b424563bf0869eaab5ab9a69e012a4" }
|
||||
#egui_virtual_list = "0.6.0"
|
||||
egui_virtual_list = { git = "https://github.com/jb55/hello_egui", rev = "a66b6794f5e707a2f4109633770e02b02fb722e1" }
|
||||
ehttp = "0.5.0"
|
||||
enostr = { path = "crates/enostr" }
|
||||
ewebsock = { version = "0.2.0", features = ["tls"] }
|
||||
@@ -40,8 +41,8 @@ notedeck_columns = { path = "crates/notedeck_columns" }
|
||||
tokenator = { path = "crates/tokenator" }
|
||||
open = "5.3.0"
|
||||
poll-promise = { version = "0.3.0", features = ["tokio"] }
|
||||
puffin = { git = "https://github.com/jb55/puffin", package = "puffin", rev = "70ff86d5503815219b01a009afd3669b7903a057" }
|
||||
puffin_egui = { git = "https://github.com/jb55/puffin", package = "puffin_egui", rev = "70ff86d5503815219b01a009afd3669b7903a057" }
|
||||
puffin = { git = "https://github.com/jb55/puffin", package = "puffin", rev = "c6a6242adaf90b6292c0f462d2acd34d96d224d2" }
|
||||
puffin_egui = { git = "https://github.com/jb55/puffin", package = "puffin_egui", rev = "c6a6242adaf90b6292c0f462d2acd34d96d224d2" }
|
||||
serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence
|
||||
serde_derive = "1"
|
||||
serde_json = "1.0.89"
|
||||
@@ -73,9 +74,18 @@ strip = true # Strip symbols from binary*
|
||||
|
||||
|
||||
[patch.crates-io]
|
||||
egui = { git = "https://github.com/damus-io/egui", rev = "732f783a560a807a7e3381c119223c1d7dbfca06" }
|
||||
eframe = { git = "https://github.com/damus-io/egui", rev = "732f783a560a807a7e3381c119223c1d7dbfca06" }
|
||||
egui-winit = { git = "https://github.com/damus-io/egui", rev = "732f783a560a807a7e3381c119223c1d7dbfca06" }
|
||||
egui_extras = { git = "https://github.com/damus-io/egui", rev = "732f783a560a807a7e3381c119223c1d7dbfca06" }
|
||||
epaint = { git = "https://github.com/damus-io/egui", rev = "732f783a560a807a7e3381c119223c1d7dbfca06" }
|
||||
android-activity = { git = "https://github.com/damus-io/android-activity", rev = "cd44ea0f1018f030bb3ef5ed738d5f5b174f3b59" }
|
||||
#egui = { path = "/home/jb55/dev/github/emilk/egui/crates/egui" }
|
||||
#eframe = { path = "/home/jb55/dev/github/emilk/egui/crates/eframe" }
|
||||
#egui-winit = { path = "/home/jb55/dev/github/emilk/egui/crates/egui-winit" }
|
||||
#egui_extras = { path = "/home/jb55/dev/github/emilk/egui/crates/egui_extras" }
|
||||
#epaint = { path = "/home/jb55/dev/github/emilk/egui/crates/epaint" }
|
||||
|
||||
egui = { git = "https://github.com/damus-io/egui", rev = "93cd1cedc1e8eed2b055e317226838e37a845aad" }
|
||||
eframe = { git = "https://github.com/damus-io/egui", rev = "93cd1cedc1e8eed2b055e317226838e37a845aad" }
|
||||
egui-winit = { git = "https://github.com/damus-io/egui", rev = "93cd1cedc1e8eed2b055e317226838e37a845aad" }
|
||||
egui_extras = { git = "https://github.com/damus-io/egui", rev = "93cd1cedc1e8eed2b055e317226838e37a845aad" }
|
||||
epaint = { git = "https://github.com/damus-io/egui", rev = "93cd1cedc1e8eed2b055e317226838e37a845aad" }
|
||||
#winit = { git = "https://github.com/damus-io/winit", rev = "14d61a74bee0c9863abe7ef28efae2c4d8bd3743" }
|
||||
#winit = { path = "/home/jb55/dev/github/rust-windowing/winit" }
|
||||
#android-activity = { git = "https://github.com/damus-io/android-activity", rev = "da17773852312a58c3445422dfe477162f2f1265" }
|
||||
#android-activity = { path = "/home/jb55/dev/github/rust-mobile/android-activity/android-activity" }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use egui::{
|
||||
style::{Selection, WidgetVisuals, Widgets},
|
||||
Color32, Rounding, Shadow, Stroke, Visuals,
|
||||
Color32, CornerRadius, Shadow, Stroke, Visuals,
|
||||
};
|
||||
|
||||
pub struct ColorTheme {
|
||||
@@ -29,7 +29,7 @@ pub struct ColorTheme {
|
||||
pub inactive_weak_bg_fill: Color32,
|
||||
}
|
||||
|
||||
const WIDGET_ROUNDING: Rounding = Rounding::same(8);
|
||||
const WIDGET_CORNER_RADIUS: CornerRadius = CornerRadius::same(8);
|
||||
|
||||
pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
||||
Visuals {
|
||||
@@ -56,7 +56,6 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
||||
width: 1.0,
|
||||
color: theme.noninteractive_fg_stroke_color,
|
||||
},
|
||||
rounding: WIDGET_ROUNDING,
|
||||
..default.widgets.noninteractive
|
||||
},
|
||||
inactive: WidgetVisuals {
|
||||
@@ -66,15 +65,15 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
||||
width: 1.0,
|
||||
color: theme.inactive_bg_stroke_color,
|
||||
},
|
||||
rounding: WIDGET_ROUNDING,
|
||||
corner_radius: WIDGET_CORNER_RADIUS,
|
||||
..default.widgets.inactive
|
||||
},
|
||||
hovered: WidgetVisuals {
|
||||
rounding: WIDGET_ROUNDING,
|
||||
corner_radius: WIDGET_CORNER_RADIUS,
|
||||
..default.widgets.hovered
|
||||
},
|
||||
active: WidgetVisuals {
|
||||
rounding: WIDGET_ROUNDING,
|
||||
corner_radius: WIDGET_CORNER_RADIUS,
|
||||
..default.widgets.active
|
||||
},
|
||||
open: WidgetVisuals {
|
||||
@@ -83,7 +82,6 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
||||
},
|
||||
extreme_bg_color: theme.extreme_bg_color,
|
||||
error_fg_color: theme.err_fg_color,
|
||||
window_rounding: Rounding::same(8),
|
||||
window_fill: theme.window_fill,
|
||||
window_shadow: Shadow {
|
||||
offset: [0, 8],
|
||||
|
||||
@@ -143,7 +143,7 @@ fn show_profile_card(
|
||||
frame = frame.stroke(ui.visuals().noninteractive().fg_stroke);
|
||||
}
|
||||
frame
|
||||
.rounding(8.0)
|
||||
.corner_radius(8.0)
|
||||
.inner_margin(8.0)
|
||||
.show(ui, |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
|
||||
@@ -573,7 +573,9 @@ pub(crate) fn sized_button(text: &str) -> impl Widget + '_ {
|
||||
|
||||
ui.add_sized(
|
||||
galley.rect.expand2(vec2(16.0, 8.0)).size(),
|
||||
Button::new(galley).rounding(8.0).fill(crate::colors::PINK),
|
||||
Button::new(galley)
|
||||
.corner_radius(8.0)
|
||||
.fill(crate::colors::PINK),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ impl<'a> NavTitle<'a> {
|
||||
) -> Vec<(egui::Response, f32)> {
|
||||
let y_margin: i8 = 4;
|
||||
let item_frame = egui::Frame::new()
|
||||
.rounding(egui::Rounding::same(8))
|
||||
.corner_radius(egui::CornerRadius::same(8))
|
||||
.inner_margin(Margin::symmetric(8, y_margin));
|
||||
|
||||
(0..self.columns.num_columns())
|
||||
|
||||
@@ -98,7 +98,7 @@ pub fn render_note_preview(
|
||||
.fill(ui.visuals().noninteractive().weak_bg_fill)
|
||||
.inner_margin(egui::Margin::same(8))
|
||||
.outer_margin(egui::Margin::symmetric(0, 8))
|
||||
.rounding(egui::Rounding::same(10))
|
||||
.corner_radius(egui::CornerRadius::same(10))
|
||||
.stroke(egui::Stroke::new(
|
||||
1.0,
|
||||
ui.visuals().noninteractive().bg_stroke.color,
|
||||
@@ -338,7 +338,7 @@ fn image_carousel(
|
||||
Button::image(
|
||||
Image::new(texture)
|
||||
.max_height(height)
|
||||
.rounding(5.0)
|
||||
.corner_radius(5.0)
|
||||
.fit_to_original_size(1.0),
|
||||
)
|
||||
.frame(false),
|
||||
|
||||
@@ -304,7 +304,7 @@ impl<'a, 'd> PostView<'a, 'd> {
|
||||
.outer_margin(egui::Margin::same(PostView::outer_margin()))
|
||||
.fill(ui.visuals().extreme_bg_color)
|
||||
.stroke(stroke)
|
||||
.rounding(12.0);
|
||||
.corner_radius(12.0);
|
||||
|
||||
if focused {
|
||||
frame = frame.shadow(egui::epaint::Shadow {
|
||||
@@ -452,7 +452,7 @@ impl<'a, 'd> PostView<'a, 'd> {
|
||||
let img_resp = ui.add(
|
||||
egui::Image::new(texture_handle)
|
||||
.max_size(size)
|
||||
.rounding(12.0),
|
||||
.corner_radius(12.0),
|
||||
);
|
||||
|
||||
let remove_button_rect = {
|
||||
@@ -591,7 +591,7 @@ fn media_upload_button() -> impl egui::Widget {
|
||||
};
|
||||
|
||||
painter.rect_filled(resp.rect, 8.0, fill_color);
|
||||
painter.rect_stroke(resp.rect, 8.0, stroke);
|
||||
painter.rect_stroke(resp.rect, 8.0, stroke, egui::StrokeKind::Middle);
|
||||
egui::Image::new(egui::include_image!(
|
||||
"../../../../../assets/icons/media_upload_dark_4x.png"
|
||||
))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use core::f32;
|
||||
|
||||
use egui::{vec2, Button, Layout, Margin, RichText, Rounding, ScrollArea, TextEdit};
|
||||
use egui::{vec2, Button, CornerRadius, Layout, Margin, RichText, ScrollArea, TextEdit};
|
||||
use notedeck::{Images, NotedeckTextStyle};
|
||||
|
||||
use crate::{colors, profile_state::ProfileState};
|
||||
@@ -164,7 +164,7 @@ fn in_frame(ui: &mut egui::Ui, contents: impl FnOnce(&mut egui::Ui)) {
|
||||
|
||||
fn button(text: &str, width: f32) -> egui::Button<'static> {
|
||||
Button::new(text)
|
||||
.rounding(Rounding::same(8))
|
||||
.corner_radius(CornerRadius::same(8))
|
||||
.min_size(vec2(width, 40.0))
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ pub mod preview;
|
||||
|
||||
pub use edit::EditProfileView;
|
||||
use egui::load::TexturePoll;
|
||||
use egui::{vec2, Color32, Label, Layout, Rect, RichText, Rounding, ScrollArea, Sense, Stroke};
|
||||
use egui::{vec2, Color32, CornerRadius, Label, Layout, Rect, RichText, ScrollArea, Sense, Stroke};
|
||||
use enostr::Pubkey;
|
||||
use nostrdb::{ProfileRecord, Transaction};
|
||||
pub use picture::ProfilePic;
|
||||
@@ -244,7 +244,7 @@ fn copy_key_widget(pfp_rect: &egui::Rect) -> impl egui::Widget + '_ {
|
||||
Sense::click(),
|
||||
);
|
||||
|
||||
let copy_key_rounding = Rounding::same(100);
|
||||
let copy_key_rounding = CornerRadius::same(100);
|
||||
let fill_color = if resp.hovered() {
|
||||
ui.visuals().widgets.inactive.weak_bg_fill
|
||||
} else {
|
||||
@@ -257,6 +257,7 @@ fn copy_key_widget(pfp_rect: &egui::Rect) -> impl egui::Widget + '_ {
|
||||
copy_key_rect.shrink(1.0),
|
||||
copy_key_rounding,
|
||||
Stroke::new(1.0, stroke_color),
|
||||
egui::StrokeKind::Outside,
|
||||
);
|
||||
egui::Image::new(egui::include_image!(
|
||||
"../../../../../assets/icons/key_4x.png"
|
||||
@@ -283,7 +284,7 @@ fn edit_profile_button() -> impl egui::Widget + 'static {
|
||||
|
||||
painter.rect_filled(
|
||||
rect,
|
||||
Rounding::same(8),
|
||||
CornerRadius::same(8),
|
||||
if resp.hovered() {
|
||||
ui.visuals().widgets.active.bg_fill
|
||||
} else {
|
||||
@@ -292,12 +293,13 @@ fn edit_profile_button() -> impl egui::Widget + 'static {
|
||||
);
|
||||
painter.rect_stroke(
|
||||
rect.shrink(1.0),
|
||||
Rounding::same(8),
|
||||
CornerRadius::same(8),
|
||||
if resp.hovered() {
|
||||
ui.visuals().widgets.active.bg_stroke
|
||||
} else {
|
||||
ui.visuals().widgets.inactive.bg_stroke
|
||||
},
|
||||
egui::StrokeKind::Outside,
|
||||
);
|
||||
|
||||
let edit_icon_size = vec2(16.0, 16.0);
|
||||
|
||||
@@ -3,7 +3,9 @@ use std::collections::HashMap;
|
||||
use crate::colors::PINK;
|
||||
use crate::relay_pool_manager::{RelayPoolManager, RelayStatus};
|
||||
use crate::ui::{Preview, PreviewConfig, View};
|
||||
use egui::{Align, Button, Frame, Id, Image, Layout, Margin, Rgba, RichText, Rounding, Ui, Vec2};
|
||||
use egui::{
|
||||
Align, Button, CornerRadius, Frame, Id, Image, Layout, Margin, Rgba, RichText, Ui, Vec2,
|
||||
};
|
||||
|
||||
use enostr::RelayPool;
|
||||
use notedeck::{Accounts, NotedeckTextStyle};
|
||||
@@ -225,7 +227,7 @@ fn delete_button(_dark_mode: bool) -> egui::Button<'static> {
|
||||
fn relay_frame(ui: &mut Ui) -> Frame {
|
||||
Frame::new()
|
||||
.inner_margin(Margin::same(8))
|
||||
.rounding(ui.style().noninteractive().rounding)
|
||||
.corner_radius(ui.style().noninteractive().corner_radius)
|
||||
.stroke(ui.style().visuals.noninteractive().bg_stroke)
|
||||
}
|
||||
|
||||
@@ -244,7 +246,7 @@ fn show_connection_status(ui: &mut Ui, status: RelayStatus) {
|
||||
};
|
||||
|
||||
let frame = Frame::new()
|
||||
.rounding(Rounding::same(100))
|
||||
.corner_radius(CornerRadius::same(100))
|
||||
.fill(bg_color)
|
||||
.inner_margin(Margin::symmetric(12, 4));
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use egui::{vec2, Align, Color32, RichText, Rounding, Stroke, TextEdit};
|
||||
use egui::{vec2, Align, Color32, CornerRadius, RichText, Stroke, TextEdit};
|
||||
|
||||
use super::{note::contents::NoteContext, padding};
|
||||
use crate::{
|
||||
@@ -138,7 +138,7 @@ fn search_box(query: &mut SearchQueryState, ui: &mut egui::Ui) -> bool {
|
||||
let search_container = egui::Frame {
|
||||
inner_margin: egui::Margin::symmetric(8, 0),
|
||||
outer_margin: egui::Margin::ZERO,
|
||||
rounding: Rounding::same(18), // More rounded corners
|
||||
corner_radius: CornerRadius::same(18), // More rounded corners
|
||||
shadow: Default::default(),
|
||||
fill: Color32::from_rgb(30, 30, 30), // Darker background to match screenshot
|
||||
stroke: Stroke::new(1.0, Color32::from_rgb(60, 60, 60)),
|
||||
|
||||
Reference in New Issue
Block a user