From 700247d7f3bc66f40d60db1f564b8a0f5b9fb1ec Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Fri, 14 Apr 2023 09:37:19 +0200 Subject: [PATCH] update slider style and fixed platform specific settings error --- Cargo.toml | 2 +- src/gui/styles/slider.rs | 12 ++++++------ src/main.rs | 8 ++------ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a5ecfab4..f1005f01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ indexmap = "1.9.3" plotters = { version = "0.3.4", default_features = false, features = ["area_series"] } iced = { version = "0.9.0", features = ["tokio", "image"] } iced_native = "0.10.1" -iced_lazy = "0.6.0" +iced_lazy = "0.6.1" plotters-iced = "0.8.0" maxminddb = "0.23.0" confy = "0.5.1" diff --git a/src/gui/styles/slider.rs b/src/gui/styles/slider.rs index cbaf1f60..1025e979 100644 --- a/src/gui/styles/slider.rs +++ b/src/gui/styles/slider.rs @@ -21,8 +21,8 @@ impl iced::widget::slider::StyleSheet for StyleTuple { let colors = get_colors(self.0); Appearance { rail: Rail { - colors: (colors.secondary, colors.primary), - width: 0.0, + colors: (colors.secondary, colors.buttons), + width: 3.0, }, handle: Handle { shape: HandleShape::Circle { radius: 7.0 }, @@ -37,8 +37,8 @@ impl iced::widget::slider::StyleSheet for StyleTuple { let colors = get_colors(self.0); Appearance { rail: Rail { - colors: (colors.secondary, colors.secondary), - width: 0.0, + colors: (colors.secondary, colors.buttons), + width: 3.0, }, handle: Handle { shape: HandleShape::Circle { radius: 7.0 }, @@ -53,8 +53,8 @@ impl iced::widget::slider::StyleSheet for StyleTuple { let colors = get_colors(self.0); Appearance { rail: Rail { - colors: (colors.secondary, colors.secondary), - width: 0.0, + colors: (colors.secondary, colors.buttons), + width: 3.0, }, handle: Handle { shape: HandleShape::Circle { radius: 7.0 }, diff --git a/src/main.rs b/src/main.rs index 32f3d5fd..ebd9b345 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use std::sync::{Arc, Condvar, Mutex}; use std::{panic, process, thread}; -use iced::window::Position; +use iced::window::{PlatformSpecific, Position}; use iced::{window, Application, Settings}; use chart::types::chart_type::ChartType; @@ -106,11 +106,7 @@ pub fn main() -> iced::Result { transparent: false, always_on_top: false, icon: None, - platform_specific: iced::window::PlatformSpecific { - title_hidden: true, - titlebar_transparent: true, - fullsize_content_view: true, - }, + platform_specific: PlatformSpecific::default(), }, flags: Sniffer::new( current_capture_id1,