Skip to content

Commit

Permalink
fixing settings style page lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
GyulyVGC committed Sep 21, 2024
1 parent 8eafae4 commit cb068be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/gui/pages/overview_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ fn body_no_observed(
.push(Space::with_height(FillPortion(2)))
}

fn body_pcap_error(
pcap_error: &str,
waiting: &str,
fn body_pcap_error<'a>(
pcap_error: &'a str,
waiting: &'a str,
language: Language,
font: Font,
) -> Column<'static, Message, StyleType> {
) -> Column<'a, Message, StyleType> {
// let err_string = pcap_error.clone().unwrap();
let error_text = error_translation(language, pcap_error)
.align_x(Alignment::Center)
Expand Down
14 changes: 7 additions & 7 deletions src/gui/pages/settings_style_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::utils::types::icon::Icon;
use crate::StyleType::{Day, DeepSea, MonAmour, Night};
use crate::{ConfigSettings, Language, Sniffer, StyleType};

pub fn settings_style_page<'a>(sniffer: &Sniffer) -> Container<'a, Message, StyleType> {
pub fn settings_style_page(sniffer: &Sniffer) -> Container<Message, StyleType> {
let ConfigSettings {
style,
language,
Expand Down Expand Up @@ -119,11 +119,11 @@ pub fn settings_style_page<'a>(sniffer: &Sniffer) -> Container<'a, Message, Styl
.class(ContainerType::Modal)
}

fn gradients_row<'a>(
fn gradients_row(
font: Font,
color_gradient: GradientType,
language: Language,
) -> Row<'a, Message, StyleType> {
) -> Row<'static, Message, StyleType> {
Row::new()
.align_y(Alignment::Center)
.spacing(10)
Expand Down Expand Up @@ -181,12 +181,12 @@ fn gradients_row<'a>(
)
}

fn get_palette_container<'a>(
fn get_palette_container(
style: StyleType,
name: String,
description: String,
on_press: StyleType,
) -> Button<'a, Message, StyleType> {
) -> Button<'static, Message, StyleType> {
let font = style.get_extension().font;

let is_custom = matches!(on_press, StyleType::Custom(_));
Expand Down Expand Up @@ -218,11 +218,11 @@ fn get_palette_container<'a>(
.on_press(Message::Style(on_press))
}

fn get_palette_rule<'a>(
fn get_palette_rule(
palette: Palette,
buttons_color: Color,
is_custom: bool,
) -> Container<'a, Message, StyleType> {
) -> Container<'static, Message, StyleType> {
let height = if is_custom { 25 } else { 40 };

Container::new(
Expand Down

0 comments on commit cb068be

Please sign in to comment.