Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
601ec92181 | ||
|
|
eab9357f23 |
+33
-1
@@ -2432,6 +2432,35 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
.spacing(10)
|
.spacing(10)
|
||||||
.width(iced::Length::Fill);
|
.width(iced::Length::Fill);
|
||||||
|
|
||||||
|
let remove_background: Element<'_, AppMessage> = if state.config.background.is_some() {
|
||||||
|
button(text("Remove background").size(13))
|
||||||
|
.on_press(AppMessage::RemoveBackground)
|
||||||
|
.style(b_style(color_surface, color_blue, color_text, 6.0))
|
||||||
|
.padding(8)
|
||||||
|
.into()
|
||||||
|
} else {
|
||||||
|
iced::widget::Space::new().width(0.0).height(0.0).into()
|
||||||
|
};
|
||||||
|
let background_section = column![
|
||||||
|
row![
|
||||||
|
button(text("Choose image…").size(13))
|
||||||
|
.on_press(AppMessage::PickBackgroundFile)
|
||||||
|
.style(b_style(color_surface, color_blue, color_text, 6.0))
|
||||||
|
.padding(8),
|
||||||
|
remove_background,
|
||||||
|
].spacing(8),
|
||||||
|
text(format!("Background dimming: {:.0}%", state.config.background_dim * 100.0))
|
||||||
|
.size(11)
|
||||||
|
.color(color_subtext),
|
||||||
|
slider(0.0..=1.0, state.config.background_dim, AppMessage::SetBackgroundDim)
|
||||||
|
.step(0.05),
|
||||||
|
text("Set a picture from your computer as the app background. Auto-resized; a dimming overlay keeps text readable. Applies live.")
|
||||||
|
.size(11)
|
||||||
|
.color(color_subtext),
|
||||||
|
]
|
||||||
|
.spacing(10)
|
||||||
|
.width(iced::Length::Fill);
|
||||||
|
|
||||||
// Inline avatar chooser (W4): the monogram fallback plus the bundled
|
// Inline avatar chooser (W4): the monogram fallback plus the bundled
|
||||||
// presets, each a clickable tile. Same SelectAvatar message, applied live
|
// presets, each a clickable tile. Same SelectAvatar message, applied live
|
||||||
// + persisted (and re-announced to the room).
|
// + persisted (and re-announced to the room).
|
||||||
@@ -2780,6 +2809,9 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
vertical_space(section_gap),
|
vertical_space(section_gap),
|
||||||
section_header("Theme"),
|
section_header("Theme"),
|
||||||
theme_section,
|
theme_section,
|
||||||
|
vertical_space(section_gap),
|
||||||
|
section_header("Background"),
|
||||||
|
background_section,
|
||||||
]
|
]
|
||||||
.spacing(10)
|
.spacing(10)
|
||||||
.width(iced::Length::Fill)
|
.width(iced::Length::Fill)
|
||||||
@@ -3725,7 +3757,7 @@ fn view(state: &AppState) -> Element<'_, AppMessage> {
|
|||||||
.padding(15)
|
.padding(15)
|
||||||
.width(iced::Length::Fill)
|
.width(iced::Length::Fill)
|
||||||
.height(iced::Length::Fill)
|
.height(iced::Length::Fill)
|
||||||
.style(c_style(color_crust, Color::TRANSPARENT, 0.0));
|
.style(c_style(root_bg, Color::TRANSPARENT, 0.0));
|
||||||
|
|
||||||
with_hotkey_info(
|
with_hotkey_info(
|
||||||
with_pixelpass_help(with_layout_picker(room.into(), state), state),
|
with_pixelpass_help(with_layout_picker(room.into(), state), state),
|
||||||
|
|||||||
Reference in New Issue
Block a user